diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0771f5ea..5b5f2da9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' @@ -33,14 +35,18 @@ jobs: bundle install - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/orb-ruby' + if: |- + github.repository == 'stainless-sdks/orb-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Build and upload gem artifacts - if: github.repository == 'stainless-sdks/orb-ruby' + if: |- + github.repository == 'stainless-sdks/orb-ruby' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f94eeca26..e72f11310 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.13.0" + ".": "1.14.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 2be12a8b5..53731fc5f 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-5bb582f84f0b4cf7bef84833fefd48a5f2734dc25805da2028fd8a6f1198da07.yml -openapi_spec_hash: ced0e30dc67faa2414df511819408f12 -config_hash: 3279841440b02d4e8303c961d6983492 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6b1440d47f0b1b1b92f2e40f9ad5efd301d90f66e2e05c5a932902608935aa64.yml +openapi_spec_hash: 14f386604d0d87d9459352b8a7b84eff +config_hash: c01c1191b1cd696c7ca855ff6d28a8df diff --git a/CHANGELOG.md b/CHANGELOG.md index beb041444..029a8b30b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 1.14.0 (2026-03-16) + +Full Changelog: [v1.13.0...v1.14.0](https://github.com/orbcorp/orb-ruby/compare/v1.13.0...v1.14.0) + +### Features + +* **api:** api update ([337be04](https://github.com/orbcorp/orb-ruby/commit/337be04c7a4f8abe058b0ca27becf8124badc168)) +* **api:** api update ([751628a](https://github.com/orbcorp/orb-ruby/commit/751628a1843a653fdd0a8e718ed431d8ce518c24)) +* **api:** api update ([eb40fda](https://github.com/orbcorp/orb-ruby/commit/eb40fdad4ce17f70dc2f315c000f0bd8c0118055)) +* **api:** api update ([a865cea](https://github.com/orbcorp/orb-ruby/commit/a865cea3435365ca97c336a991cdf2c632604b24)) +* **client:** add webhook support ([f434716](https://github.com/orbcorp/orb-ruby/commit/f434716cc961eae629f626c95be963e89b712c90)) + + +### Bug Fixes + +* **client:** add types for path params, and update structure of unions nested in params ([8a52368](https://github.com/orbcorp/orb-ruby/commit/8a523686305ffbee12c8f2643a37d3cab4edb5d5)) + + +### Chores + +* **ci:** skip uploading artifacts on stainless-internal branches ([21805c5](https://github.com/orbcorp/orb-ruby/commit/21805c52bfa86ecf544fdc3c5828003638d5938d)) +* **internal:** tweak CI branches ([6692611](https://github.com/orbcorp/orb-ruby/commit/6692611801c9e7402ec21d5e7eb07f46d0b61951)) +* **test:** do not count install time for mock server timeout ([b7ef3b3](https://github.com/orbcorp/orb-ruby/commit/b7ef3b3c4e1054a2a5db603476b57c9d3a64b860)) +* **tests:** update mock server to steady ([2e5e97f](https://github.com/orbcorp/orb-ruby/commit/2e5e97f7a3cf18ad23ecef601edde222bfc62bbd)) + ## 1.13.0 (2026-03-03) Full Changelog: [v1.12.0...v1.13.0](https://github.com/orbcorp/orb-ruby/compare/v1.12.0...v1.13.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 781a0604d..94942f1b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ $ bundle exec rake ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/Gemfile.lock b/Gemfile.lock index 913d9e83f..ef39b9013 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb-billing (1.13.0) + orb-billing (1.14.0) cgi connection_pool diff --git a/README.md b/README.md index 93f22b730..e7212529c 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.13.0" +gem "orb-billing", "~> 1.14.0" ``` diff --git a/lib/orb/client.rb b/lib/orb/client.rb index 01283d246..24bd8b728 100644 --- a/lib/orb/client.rb +++ b/lib/orb/client.rb @@ -18,6 +18,9 @@ class Client < Orb::Internal::Transport::BaseClient # @return [String] attr_reader :api_key + # @return [String, nil] + attr_reader :webhook_secret + # @return [Orb::Resources::TopLevel] attr_reader :top_level @@ -160,6 +163,8 @@ class Client < Orb::Internal::Transport::BaseClient # # @param api_key [String, nil] Defaults to `ENV["ORB_API_KEY"]` # + # @param webhook_secret [String, nil] Defaults to `ENV["ORB_WEBHOOK_SECRET"]` + # # @param base_url [String, nil] Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["ORB_BASE_URL"]` # @@ -174,6 +179,7 @@ class Client < Orb::Internal::Transport::BaseClient # @param idempotency_header [String] def initialize( api_key: ENV["ORB_API_KEY"], + webhook_secret: ENV["ORB_WEBHOOK_SECRET"], base_url: ENV["ORB_BASE_URL"], max_retries: self.class::DEFAULT_MAX_RETRIES, timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS, @@ -188,6 +194,7 @@ def initialize( end @api_key = api_key.to_s + @webhook_secret = webhook_secret&.to_s super( base_url: base_url, diff --git a/lib/orb/models/alert.rb b/lib/orb/models/alert.rb index cbdcf8926..ea017f37d 100644 --- a/lib/orb/models/alert.rb +++ b/lib/orb/models/alert.rb @@ -74,13 +74,20 @@ class Alert < Orb::Internal::Type::BaseModel -> { Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus] }, nil?: true + # @!attribute grouping_keys + # The property keys to group cost alerts by. Only present for cost alerts with + # grouping enabled. + # + # @return [Array, nil] + optional :grouping_keys, Orb::Internal::Type::ArrayOf[String], nil?: true + # @!attribute license_type # Minified license type for alert serialization. # # @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, license_type: nil) + # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil) # Some parameter documentations has been truncated, see {Orb::Models::Alert} for # more details. # @@ -112,6 +119,8 @@ class Alert < Orb::Internal::Type::BaseModel # # @param balance_alert_status [Array, nil] The current status of the alert. This field is only present for credit balance a # + # @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. # @see Orb::Models::Alert#metric diff --git a/lib/orb/models/alert_create_for_customer_params.rb b/lib/orb/models/alert_create_for_customer_params.rb index 2b7af5dae..45142b738 100644 --- a/lib/orb/models/alert_create_for_customer_params.rb +++ b/lib/orb/models/alert_create_for_customer_params.rb @@ -7,6 +7,11 @@ class AlertCreateForCustomerParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute currency # The case sensitive currency or custom pricing unit to use for this alert. # @@ -25,7 +30,9 @@ class AlertCreateForCustomerParams < Orb::Internal::Type::BaseModel # @return [Array, nil] optional :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }, nil?: true - # @!method initialize(currency:, type:, thresholds: nil, request_options: {}) + # @!method initialize(customer_id:, currency:, type:, thresholds: nil, request_options: {}) + # @param customer_id [String] + # # @param currency [String] The case sensitive currency or custom pricing unit to use for this alert. # # @param type [Symbol, Orb::Models::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type. diff --git a/lib/orb/models/alert_create_for_external_customer_params.rb b/lib/orb/models/alert_create_for_external_customer_params.rb index 880a8be89..29a5a0e1f 100644 --- a/lib/orb/models/alert_create_for_external_customer_params.rb +++ b/lib/orb/models/alert_create_for_external_customer_params.rb @@ -7,6 +7,11 @@ class AlertCreateForExternalCustomerParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute currency # The case sensitive currency or custom pricing unit to use for this alert. # @@ -25,7 +30,9 @@ class AlertCreateForExternalCustomerParams < Orb::Internal::Type::BaseModel # @return [Array, nil] optional :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] }, nil?: true - # @!method initialize(currency:, type:, thresholds: nil, request_options: {}) + # @!method initialize(external_customer_id:, currency:, type:, thresholds: nil, request_options: {}) + # @param external_customer_id [String] + # # @param currency [String] The case sensitive currency or custom pricing unit to use for this alert. # # @param type [Symbol, Orb::Models::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type. diff --git a/lib/orb/models/alert_create_for_subscription_params.rb b/lib/orb/models/alert_create_for_subscription_params.rb index 96d3daaaf..fc7a33710 100644 --- a/lib/orb/models/alert_create_for_subscription_params.rb +++ b/lib/orb/models/alert_create_for_subscription_params.rb @@ -7,6 +7,11 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute thresholds # The thresholds that define the values at which the alert will be triggered. # @@ -19,19 +24,42 @@ class AlertCreateForSubscriptionParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] required :type, enum: -> { Orb::AlertCreateForSubscriptionParams::Type } + # @!attribute grouping_keys + # The property keys to group cost alerts by. Only applicable for cost_exceeded + # alerts. + # + # @return [Array, nil] + optional :grouping_keys, Orb::Internal::Type::ArrayOf[String], nil?: true + # @!attribute metric_id # The metric to track usage for. # # @return [String, nil] optional :metric_id, String, nil?: true - # @!method initialize(thresholds:, type:, metric_id: nil, request_options: {}) + # @!attribute pricing_unit_id + # The pricing unit to use for grouped cost alerts. Required when grouping_keys is + # set. + # + # @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: {}) + # Some parameter documentations has been truncated, see + # {Orb::Models::AlertCreateForSubscriptionParams} for more details. + # + # @param subscription_id [String] + # # @param thresholds [Array] The thresholds that define the values at which the alert will be triggered. # # @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type. # + # @param grouping_keys [Array, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale + # # @param metric_id [String, nil] The metric to track usage for. # + # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # The type of alert to create. This must be a valid alert type. diff --git a/lib/orb/models/alert_disable_params.rb b/lib/orb/models/alert_disable_params.rb index 4c3e373fe..6242148cc 100644 --- a/lib/orb/models/alert_disable_params.rb +++ b/lib/orb/models/alert_disable_params.rb @@ -7,13 +7,20 @@ class AlertDisableParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute alert_configuration_id + # + # @return [String] + required :alert_configuration_id, String + # @!attribute subscription_id # Used to update the status of a plan alert scoped to this subscription_id # # @return [String, nil] optional :subscription_id, String, nil?: true - # @!method initialize(subscription_id: nil, request_options: {}) + # @!method initialize(alert_configuration_id:, subscription_id: nil, request_options: {}) + # @param alert_configuration_id [String] + # # @param subscription_id [String, nil] Used to update the status of a plan alert scoped to this subscription_id # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/alert_enable_params.rb b/lib/orb/models/alert_enable_params.rb index f4624f5ab..4915b7d22 100644 --- a/lib/orb/models/alert_enable_params.rb +++ b/lib/orb/models/alert_enable_params.rb @@ -7,13 +7,20 @@ class AlertEnableParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute alert_configuration_id + # + # @return [String] + required :alert_configuration_id, String + # @!attribute subscription_id # Used to update the status of a plan alert scoped to this subscription_id # # @return [String, nil] optional :subscription_id, String, nil?: true - # @!method initialize(subscription_id: nil, request_options: {}) + # @!method initialize(alert_configuration_id:, subscription_id: nil, request_options: {}) + # @param alert_configuration_id [String] + # # @param subscription_id [String, nil] Used to update the status of a plan alert scoped to this subscription_id # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/alert_retrieve_params.rb b/lib/orb/models/alert_retrieve_params.rb index e2a228ad3..eb9ee5277 100644 --- a/lib/orb/models/alert_retrieve_params.rb +++ b/lib/orb/models/alert_retrieve_params.rb @@ -7,7 +7,13 @@ class AlertRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute alert_id + # + # @return [String] + required :alert_id, String + + # @!method initialize(alert_id:, request_options: {}) + # @param alert_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/alert_update_params.rb b/lib/orb/models/alert_update_params.rb index 2d320f5b8..cc6112ecd 100644 --- a/lib/orb/models/alert_update_params.rb +++ b/lib/orb/models/alert_update_params.rb @@ -7,13 +7,20 @@ class AlertUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute alert_configuration_id + # + # @return [String] + required :alert_configuration_id, String + # @!attribute thresholds # The thresholds that define the values at which the alert will be triggered. # # @return [Array] required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Threshold] } - # @!method initialize(thresholds:, request_options: {}) + # @!method initialize(alert_configuration_id:, thresholds:, request_options: {}) + # @param alert_configuration_id [String] + # # @param thresholds [Array] The thresholds that define the values at which the alert will be triggered. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] 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 c0a1d4b4f..3a7d10ef4 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 @@ -8,6 +8,11 @@ class ExternalPlanIDCreatePlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_plan_id + # + # @return [String] + required :external_plan_id, String + # @!attribute version # New version number. # @@ -80,7 +85,9 @@ class ExternalPlanIDCreatePlanVersionParams < Orb::Internal::Type::BaseModel # @return [Boolean, nil] optional :set_as_default, Orb::Internal::Type::Boolean, nil?: true - # @!method initialize(version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {}) + # @!method initialize(external_plan_id:, version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {}) + # @param external_plan_id [String] + # # @param version [Integer] New version number. # # @param add_adjustments [Array, nil] Additional adjustments to be added to the plan. @@ -148,6 +155,16 @@ class AddPrice < Orb::Internal::Type::BaseModel # @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::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] + optional :license_allocation_price, + union: -> { + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice + }, + nil?: true + # @!attribute plan_phase_order # The phase to add this price to. # @@ -162,102 +179,123 @@ class AddPrice < Orb::Internal::Type::BaseModel union: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price }, nil?: true - # @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil) + # @!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 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. - # New plan price request body params. + # The license allocation price to add to the plan. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#price - module Price + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice#license_allocation_price + module LicenseAllocationPrice extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, -> { Orb::NewPlanUnitPrice } + variant :unit, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } - variant :tiered, -> { Orb::NewPlanTieredPrice } + variant :tiered, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } - variant :bulk, -> { Orb::NewPlanBulkPrice } + variant :bulk, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } variant :bulk_with_filters, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } - variant :package, -> { Orb::NewPlanPackagePrice } + variant :package, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } - variant :matrix, -> { Orb::NewPlanMatrixPrice } + variant :matrix, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } + variant :threshold_total_amount, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } + variant :tiered_package, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } + variant :tiered_with_minimum, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } + variant :grouped_tiered, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } + variant :tiered_package_with_minimum, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } + variant :package_with_allocation, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } + variant :unit_with_percent, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_allocation, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } variant :tiered_with_proration, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } + variant :unit_with_proration, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } + variant :grouped_allocation, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } + variant :bulk_with_proration, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } + variant :grouped_with_prorated_minimum, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } + variant :grouped_with_metered_minimum, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } variant :grouped_with_min_max_thresholds, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } + variant :matrix_with_display_name, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } + variant :grouped_tiered_package, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } + variant :max_group_tiered_package, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } + variant :scalable_matrix_with_unit_pricing, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } + variant :cumulative_grouped_bulk, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } variant :cumulative_grouped_allocation, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + variant :minimum_composite, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } - variant :percent, -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent } + variant :percent, + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::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 } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -265,11 +303,24 @@ class BulkWithFilters < 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, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :unit] + required :model_type, const: :unit # @!attribute name # The name of the price. @@ -277,6 +328,12 @@ class BulkWithFilters < 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. @@ -310,7 +367,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig }, nil?: true @@ -378,19 +435,21 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::BulkWithFilters} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} # 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 cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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 @@ -419,85 +478,11 @@ class BulkWithFilters < 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_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 + # @param model_type [Symbol, :unit] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence module Cadence extend Orb::Internal::Type::Enum @@ -511,15 +496,42 @@ 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 TieredWithProration < Orb::Internal::Type::BaseModel + class Tiered < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -527,11 +539,24 @@ class TieredWithProration < 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_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :tiered] + required :model_type, const: :tiered # @!attribute name # The name of the price. @@ -539,12 +564,11 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing + # @!attribute tiered_config + # Configuration for tiered pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } + # @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 @@ -579,7 +603,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig }, nil?: true @@ -647,18 +671,20 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::TieredWithProration} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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_with_proration_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing + # @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 # @@ -688,11 +714,11 @@ class TieredWithProration < 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_with_proration] The pricing model type + # @param model_type [Symbol, :tiered] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence module Cadence extend Orb::Internal::Type::Enum @@ -707,66 +733,47 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @return [Array] - required :tiers, - -> do - Orb::Internal::Type::ArrayOf[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] - end + # @return [String] + required :amount, String - # @!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 + # @!attribute currency + # The currency of the license allocation. # - # @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 + # @return [String] + required :currency, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, 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(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 + # @!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 + 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::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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 } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -774,11 +781,24 @@ class GroupedWithMinMaxThresholds < 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, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds + # @return [Symbol, :bulk] + required :model_type, const: :bulk # @!attribute name # The name of the price. @@ -819,7 +839,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig }, nil?: true @@ -887,17 +907,19 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing # - # @param grouped_with_min_max_thresholds_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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 @@ -928,11 +950,11 @@ class GroupedWithMinMaxThresholds < 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, :grouped_with_min_max_thresholds] The pricing model type + # @param model_type [Symbol, :bulk] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence module Cadence extend Orb::Internal::Type::Enum @@ -947,59 +969,17400 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # # @return [String] - required :grouping_key, String + required :amount, String - # @!attribute maximum_charge - # The maximum amount to charge each group + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :maximum_charge, String + required :currency, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [String] - required :minimum_charge, String + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!attribute per_unit_rate - # The base price charged per group + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @return [String] - required :per_unit_rate, String + # @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::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 - # @!method initialize(grouping_key:, maximum_charge:, minimum_charge:, per_unit_rate:) - # Configuration for grouped_with_min_max_thresholds pricing + # @!attribute unit_amount + # The amount to charge for each unit outside of the allocation # - # @param grouping_key [String] The event property used to group before applying thresholds + # @return [String] + required :unit_amount, String + + # @!method initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) + # Configuration for cumulative_grouped_allocation pricing # - # @param maximum_charge [String] The maximum amount to charge each group + # @param cumulative_allocation [String] The overall allocation across all groups # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param group_allocation [String] The allocation per individual group # - # @param per_unit_rate [String] The base price charged per 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 CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class MinimumComposite < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1007,11 +18370,31 @@ class CumulativeGroupedAllocation < 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, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :minimum_composite] + required :model_type, const: :minimum_composite # @!attribute name # The name of the price. @@ -1052,7 +18435,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig }, nil?: true @@ -1120,17 +18503,19 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::CumulativeGroupedAllocation} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite} # 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 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 license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param minimum_composite_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 @@ -1161,11 +18546,11 @@ class CumulativeGroupedAllocation < 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, :cumulative_grouped_allocation] The pricing model type + # @param model_type [Symbol, :minimum_composite] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1180,42 +18565,53 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # # @return [String] - required :cumulative_allocation, String + required :amount, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :group_allocation, String + required :currency, String - # @!attribute grouping_key - # The event property used to group usage before applying allocations + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [String] - required :grouping_key, String + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @return [String] - required :unit_amount, String + # @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 initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @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 # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String] + required :minimum_amount, String + + # @!attribute prorated + # If true, subtotals from this price are prorated based on the service period # - # @param group_allocation [String] The allocation per individual group + # @return [Boolean, nil] + optional :prorated, Orb::Internal::Type::Boolean + + # @!method initialize(minimum_amount:, prorated: nil) + # Configuration for minimum_composite pricing # - # @param grouping_key [String] The event property used to group usage before applying allocations + # @param minimum_amount [String] The minimum amount to apply # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period end end @@ -1223,9 +18619,9 @@ 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] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1233,6 +18629,19 @@ 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 # @@ -1248,9 +18657,9 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute percent_config # Configuration for percent pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] required :percent_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -1285,7 +18694,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig }, nil?: true @@ -1353,18 +18762,20 @@ class Percent < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::Percent} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::Price::Percent::PercentConfig] Configuration for percent pricing + # @param percent_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 # @@ -1398,7 +18809,7 @@ class Percent < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1413,7 +18824,34 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent#percent_config + 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 class PercentConfig < Orb::Internal::Type::BaseModel # @!attribute percent # What percent of the component subtotals to charge @@ -1432,16 +18870,16 @@ 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] + # @return [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] required :cadence, - enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence } + enum: -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } # @!attribute event_output_config # Configuration for event_output pricing # - # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] + # @return [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] required :event_output_config, - -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } + -> { Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1449,6 +18887,19 @@ 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 # @@ -1494,7 +18945,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig }, nil?: true @@ -1562,17 +19013,19 @@ class EventOutput < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::EventOutput} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput} # for more details. # - # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 event_output_config [Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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 @@ -1607,7 +19060,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1622,7 +19075,7 @@ module Cadence # @return [Array] end - # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config + # @see Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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. @@ -1647,7 +19100,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::AddPrice::Price::EventOutput::EventOutputConfig} + # {Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} # for more details. # # Configuration for event_output pricing @@ -1658,136 +19111,38 @@ 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 - - # @!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 } + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String - variant :amount_discount, -> { Orb::NewAmountDiscount } + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String - variant :minimum, -> { Orb::NewMinimum } + # @!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 - variant :maximum, -> { Orb::NewMaximum } + # @!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::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + # @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)] 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 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, 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 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. # New plan price request body params. # diff --git a/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb index e88e358bb..409ecd341 100644 --- a/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb @@ -13,8 +13,14 @@ class ExternalPlanIDFetchPlanVersionParams < Orb::Internal::Type::BaseModel # @return [String] required :external_plan_id, String - # @!method initialize(external_plan_id:, request_options: {}) + # @!attribute version + # + # @return [String] + required :version, String + + # @!method initialize(external_plan_id:, version:, request_options: {}) # @param external_plan_id [String] + # @param version [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb b/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb index b333c7b7c..b6e27070b 100644 --- a/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +++ b/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb @@ -8,13 +8,20 @@ class ExternalPlanIDSetDefaultPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_plan_id + # + # @return [String] + required :external_plan_id, String + # @!attribute version # Plan version to set as the default. # # @return [Integer] required :version, Integer - # @!method initialize(version:, request_options: {}) + # @!method initialize(external_plan_id:, version:, request_options: {}) + # @param external_plan_id [String] + # # @param version [Integer] Plan version to set as the default. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/beta_create_plan_version_params.rb b/lib/orb/models/beta_create_plan_version_params.rb index 6f8efdf4f..0e288ef26 100644 --- a/lib/orb/models/beta_create_plan_version_params.rb +++ b/lib/orb/models/beta_create_plan_version_params.rb @@ -7,6 +7,11 @@ class BetaCreatePlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute plan_id + # + # @return [String] + required :plan_id, String + # @!attribute version # New version number. # @@ -67,7 +72,9 @@ class BetaCreatePlanVersionParams < Orb::Internal::Type::BaseModel # @return [Boolean, nil] optional :set_as_default, Orb::Internal::Type::Boolean, nil?: true - # @!method initialize(version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {}) + # @!method initialize(plan_id:, version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {}) + # @param plan_id [String] + # # @param version [Integer] New version number. # # @param add_adjustments [Array, nil] Additional adjustments to be added to the plan. @@ -134,6 +141,14 @@ class AddPrice < Orb::Internal::Type::BaseModel # @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::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] + optional :license_allocation_price, + union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice }, + nil?: true + # @!attribute plan_phase_order # The phase to add this price to. # @@ -146,100 +161,117 @@ class AddPrice < Orb::Internal::Type::BaseModel # @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] optional :price, union: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price }, nil?: true - # @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil) + # @!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 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. - # New plan price request body params. + # The license allocation price to add to the plan. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#price - module Price + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice#license_allocation_price + module LicenseAllocationPrice extend Orb::Internal::Type::Union discriminator :model_type - variant :unit, -> { Orb::NewPlanUnitPrice } + variant :unit, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit } - variant :tiered, -> { Orb::NewPlanTieredPrice } + variant :tiered, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered } - variant :bulk, -> { Orb::NewPlanBulkPrice } + variant :bulk, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk } - variant :bulk_with_filters, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters } + variant :bulk_with_filters, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters } - variant :package, -> { Orb::NewPlanPackagePrice } + variant :package, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package } - variant :matrix, -> { Orb::NewPlanMatrixPrice } + variant :matrix, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix } - variant :threshold_total_amount, -> { Orb::NewPlanThresholdTotalAmountPrice } + variant :threshold_total_amount, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount } - variant :tiered_package, -> { Orb::NewPlanTieredPackagePrice } + variant :tiered_package, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackage } - variant :tiered_with_minimum, -> { Orb::NewPlanTieredWithMinimumPrice } + variant :tiered_with_minimum, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithMinimum } - variant :grouped_tiered, -> { Orb::NewPlanGroupedTieredPrice } + variant :grouped_tiered, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTiered } - variant :tiered_package_with_minimum, -> { Orb::NewPlanTieredPackageWithMinimumPrice } + variant :tiered_package_with_minimum, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredPackageWithMinimum } - variant :package_with_allocation, -> { Orb::NewPlanPackageWithAllocationPrice } + variant :package_with_allocation, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::PackageWithAllocation } - variant :unit_with_percent, -> { Orb::NewPlanUnitWithPercentPrice } + variant :unit_with_percent, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithPercent } - variant :matrix_with_allocation, -> { Orb::NewPlanMatrixWithAllocationPrice } + variant :matrix_with_allocation, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithAllocation } variant :tiered_with_proration, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::TieredWithProration } - variant :unit_with_proration, -> { Orb::NewPlanUnitWithProrationPrice } + variant :unit_with_proration, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::UnitWithProration } - variant :grouped_allocation, -> { Orb::NewPlanGroupedAllocationPrice } + variant :grouped_allocation, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedAllocation } - variant :bulk_with_proration, -> { Orb::NewPlanBulkWithProrationPrice } + variant :bulk_with_proration, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithProration } - variant :grouped_with_prorated_minimum, -> { Orb::NewPlanGroupedWithProratedMinimumPrice } + variant :grouped_with_prorated_minimum, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithProratedMinimum } - variant :grouped_with_metered_minimum, -> { Orb::NewPlanGroupedWithMeteredMinimumPrice } + variant :grouped_with_metered_minimum, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMeteredMinimum } variant :grouped_with_min_max_thresholds, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedWithMinMaxThresholds } - variant :matrix_with_display_name, -> { Orb::NewPlanMatrixWithDisplayNamePrice } + variant :matrix_with_display_name, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MatrixWithDisplayName } - variant :grouped_tiered_package, -> { Orb::NewPlanGroupedTieredPackagePrice } + variant :grouped_tiered_package, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::GroupedTieredPackage } - variant :max_group_tiered_package, -> { Orb::NewPlanMaxGroupTieredPackagePrice } + variant :max_group_tiered_package, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MaxGroupTieredPackage } - variant :scalable_matrix_with_unit_pricing, -> { Orb::NewPlanScalableMatrixWithUnitPricingPrice } + variant :scalable_matrix_with_unit_pricing, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithUnitPricing } - variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewPlanScalableMatrixWithTieredPricingPrice } + variant :scalable_matrix_with_tiered_pricing, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing } - variant :cumulative_grouped_bulk, -> { Orb::NewPlanCumulativeGroupedBulkPrice } + variant :cumulative_grouped_bulk, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedBulk } variant :cumulative_grouped_allocation, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation } - - variant :minimum_composite, -> { Orb::NewPlanMinimumCompositePrice } + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::CumulativeGroupedAllocation } - variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent } + variant :minimum_composite, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::MinimumComposite } - variant :event_output, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput } + variant :percent, -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Percent } - 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 } + variant :event_output, + -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::EventOutput } + class Unit < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -247,11 +279,20 @@ class BulkWithFilters < 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, :bulk_with_filters] - required :model_type, const: :bulk_with_filters + # @return [Symbol, :unit] + required :model_type, const: :unit # @!attribute name # The name of the price. @@ -259,6 +300,12 @@ class BulkWithFilters < 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. @@ -292,7 +339,7 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::ConversionRateConfig }, nil?: true @@ -360,19 +407,21 @@ class BulkWithFilters < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::BulkWithFilters} for - # more details. - # - # @param bulk_with_filters_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit} + # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::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 @@ -401,77 +450,11 @@ class BulkWithFilters < 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_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 + # @param model_type [Symbol, :unit] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit#cadence module Cadence extend Orb::Internal::Type::Enum @@ -485,15 +468,42 @@ 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 TieredWithProration < Orb::Internal::Type::BaseModel + class Tiered < Orb::Internal::Type::BaseModel # @!attribute cadence # The cadence to bill for this price on. # - # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence] required :cadence, - enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -501,11 +511,20 @@ class TieredWithProration < 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_with_proration] - required :model_type, const: :tiered_with_proration + # @return [Symbol, :tiered] + required :model_type, const: :tiered # @!attribute name # The name of the price. @@ -513,12 +532,11 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [String] required :name, String - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing + # @!attribute tiered_config + # Configuration for tiered pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] - required :tiered_with_proration_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig } + # @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 @@ -553,7 +571,7 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::ConversionRateConfig }, nil?: true @@ -621,18 +639,20 @@ class TieredWithProration < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::TieredWithProration} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::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_with_proration_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig] Configuration for tiered_with_proration pricing + # @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 # @@ -662,11 +682,11 @@ class TieredWithProration < 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_with_proration] The pricing model type + # @param model_type [Symbol, :tiered] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered#cadence module Cadence extend Orb::Internal::Type::Enum @@ -681,62 +701,47 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] } + # @return [String] + required :amount, String - # @!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 + # @!attribute currency + # The currency of the license allocation. # - # @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 + # @return [String] + required :currency, String - # @!attribute unit_amount - # Amount per unit - # - # @return [String] - required :unit_amount, 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(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 + # @!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 + 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::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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 } + enum: -> { Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -744,11 +749,20 @@ class GroupedWithMinMaxThresholds < 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, :grouped_with_min_max_thresholds] - required :model_type, const: :grouped_with_min_max_thresholds + # @return [Symbol, :bulk] + required :model_type, const: :bulk # @!attribute name # The name of the price. @@ -789,7 +803,7 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::ConversionRateConfig }, nil?: true @@ -857,17 +871,19 @@ class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel # @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) + # @!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::AddPrice::Price::GroupedWithMinMaxThresholds} + # {Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk} # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. + # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing # - # @param grouped_with_min_max_thresholds_config [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::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 @@ -898,11 +914,11 @@ class GroupedWithMinMaxThresholds < 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, :grouped_with_min_max_thresholds] The pricing model type + # @param model_type [Symbol, :bulk] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk#cadence module Cadence extend Orb::Internal::Type::Enum @@ -917,59 +933,17280 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # # @return [String] - required :maximum_charge, String + required :amount, String - # @!attribute minimum_charge - # The minimum amount to charge each group, regardless of usage + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :minimum_charge, String + required :currency, String - # @!attribute per_unit_rate - # The base price charged per group + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [String] - required :per_unit_rate, String + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!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 + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @param minimum_charge [String] The minimum amount to charge each group, regardless of usage + # @param currency [String] The currency of the license allocation. # - # @param per_unit_rate [String] The base price charged per group + # @param write_off_overage [Boolean, nil] When True, overage beyond the allocation is written off. end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + 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 + + 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::Price::CumulativeGroupedAllocation::Cadence] + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 } + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -977,11 +18214,31 @@ class CumulativeGroupedAllocation < 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, :cumulative_grouped_allocation] - required :model_type, const: :cumulative_grouped_allocation + # @return [Symbol, :minimum_composite] + required :model_type, const: :minimum_composite # @!attribute name # The name of the price. @@ -1022,7 +18279,7 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::ConversionRateConfig }, nil?: true @@ -1090,17 +18347,19 @@ class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::CumulativeGroupedAllocation} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite} # 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 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 license_allocations [Array] License allocations to associate with this price. Each entry defines a per-licen + # + # @param minimum_composite_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 @@ -1131,11 +18390,11 @@ class CumulativeGroupedAllocation < 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, :cumulative_grouped_allocation] The pricing model type + # @param model_type [Symbol, :minimum_composite] The pricing model type # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1150,42 +18409,53 @@ module Cadence # @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 + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. # # @return [String] - required :cumulative_allocation, String + required :amount, String - # @!attribute group_allocation - # The allocation per individual group + # @!attribute currency + # The currency of the license allocation. # # @return [String] - required :group_allocation, String + required :currency, String - # @!attribute grouping_key - # The event property used to group usage before applying allocations + # @!attribute write_off_overage + # When True, overage beyond the allocation is written off. # - # @return [String] - required :grouping_key, String + # @return [Boolean, nil] + optional :write_off_overage, Orb::Internal::Type::Boolean, nil?: true - # @!attribute unit_amount - # The amount to charge for each unit outside of the allocation + # @!method initialize(amount:, currency:, write_off_overage: nil) + # @param amount [String] The amount of credits granted per active license per cadence. # - # @return [String] - required :unit_amount, String + # @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 initialize(cumulative_allocation:, group_allocation:, grouping_key:, unit_amount:) - # Configuration for cumulative_grouped_allocation pricing + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite#minimum_composite_config + class MinimumCompositeConfig < Orb::Internal::Type::BaseModel + # @!attribute minimum_amount + # The minimum amount to apply # - # @param cumulative_allocation [String] The overall allocation across all groups + # @return [String] + required :minimum_amount, String + + # @!attribute prorated + # If true, subtotals from this price are prorated based on the service period # - # @param group_allocation [String] The allocation per individual group + # @return [Boolean, nil] + optional :prorated, Orb::Internal::Type::Boolean + + # @!method initialize(minimum_amount:, prorated: nil) + # Configuration for minimum_composite pricing # - # @param grouping_key [String] The event property used to group usage before applying allocations + # @param minimum_amount [String] The minimum amount to apply # - # @param unit_amount [String] The amount to charge for each unit outside of the allocation + # @param prorated [Boolean] If true, subtotals from this price are prorated based on the service period end end @@ -1193,8 +18463,9 @@ 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 } + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::Cadence } # @!attribute item_id # The id of the item the price will be associated with. @@ -1202,6 +18473,15 @@ 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 # @@ -1217,8 +18497,9 @@ class Percent < Orb::Internal::Type::BaseModel # @!attribute percent_config # Configuration for percent pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig] - required :percent_config, -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig } + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig] + required :percent_config, + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig } # @!attribute billable_metric_id # The id of the billable metric for the price. Only needed if the price is @@ -1253,7 +18534,7 @@ class Percent < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::ConversionRateConfig }, nil?: true @@ -1321,18 +18602,20 @@ class Percent < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::Percent} for more - # details. + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent} + # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::Price::Percent::PercentConfig] Configuration for percent pricing + # @param percent_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 # @@ -1366,7 +18649,7 @@ class Percent < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1381,7 +18664,34 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent#percent_config + 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 class PercentConfig < Orb::Internal::Type::BaseModel # @!attribute percent # What percent of the component subtotals to charge @@ -1400,15 +18710,16 @@ 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 } + # @return [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence] + required :cadence, + enum: -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::Cadence } # @!attribute event_output_config # Configuration for event_output pricing # - # @return [Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig] + # @return [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig] required :event_output_config, - -> { Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig } + -> { Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig } # @!attribute item_id # The id of the item the price will be associated with. @@ -1416,6 +18727,15 @@ 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 # @@ -1461,7 +18781,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] optional :conversion_rate_config, union: -> { - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::ConversionRateConfig + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::ConversionRateConfig }, nil?: true @@ -1529,17 +18849,19 @@ class EventOutput < Orb::Internal::Type::BaseModel # @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) + # @!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::Price::EventOutput} for - # more details. + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput} + # for more details. # - # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence] The cadence to bill for this price on. + # @param cadence [Symbol, Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 event_output_config [Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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 @@ -1574,7 +18896,7 @@ class EventOutput < Orb::Internal::Type::BaseModel # The cadence to bill for this price on. # - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#cadence + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput#cadence module Cadence extend Orb::Internal::Type::Enum @@ -1589,7 +18911,7 @@ module Cadence # @return [Array] end - # @see Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput#event_output_config + # @see Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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. @@ -1614,7 +18936,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::AddPrice::Price::EventOutput::EventOutputConfig} + # {Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::EventOutputConfig} # for more details. # # Configuration for event_output pricing @@ -1625,133 +18947,38 @@ 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 - - # @!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 } + class LicenseAllocation < Orb::Internal::Type::BaseModel + # @!attribute amount + # The amount of credits granted per active license per cadence. + # + # @return [String] + required :amount, String - variant :amount_discount, -> { Orb::NewAmountDiscount } + # @!attribute currency + # The currency of the license allocation. + # + # @return [String] + required :currency, String - variant :minimum, -> { Orb::NewMinimum } + # @!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 - variant :maximum, -> { Orb::NewMaximum } + # @!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::NewPercentageDiscount, Orb::Models::NewUsageDiscount, Orb::Models::NewAmountDiscount, Orb::Models::NewMinimum, Orb::Models::NewMaximum)] + # @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)] 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 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, 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 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. # New plan price request body params. # diff --git a/lib/orb/models/beta_fetch_plan_version_params.rb b/lib/orb/models/beta_fetch_plan_version_params.rb index ee9d0042d..920ab86b2 100644 --- a/lib/orb/models/beta_fetch_plan_version_params.rb +++ b/lib/orb/models/beta_fetch_plan_version_params.rb @@ -12,8 +12,14 @@ class BetaFetchPlanVersionParams < Orb::Internal::Type::BaseModel # @return [String] required :plan_id, String - # @!method initialize(plan_id:, request_options: {}) + # @!attribute version + # + # @return [String] + required :version, String + + # @!method initialize(plan_id:, version:, request_options: {}) # @param plan_id [String] + # @param version [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/beta_set_default_plan_version_params.rb b/lib/orb/models/beta_set_default_plan_version_params.rb index 2ec3d7e9e..2e3563cc5 100644 --- a/lib/orb/models/beta_set_default_plan_version_params.rb +++ b/lib/orb/models/beta_set_default_plan_version_params.rb @@ -7,13 +7,20 @@ class BetaSetDefaultPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute plan_id + # + # @return [String] + required :plan_id, String + # @!attribute version # Plan version to set as the default. # # @return [Integer] required :version, Integer - # @!method initialize(version:, request_options: {}) + # @!method initialize(plan_id:, version:, request_options: {}) + # @param plan_id [String] + # # @param version [Integer] Plan version to set as the default. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/coupon_archive_params.rb b/lib/orb/models/coupon_archive_params.rb index 70a7d36a3..b7c09e982 100644 --- a/lib/orb/models/coupon_archive_params.rb +++ b/lib/orb/models/coupon_archive_params.rb @@ -7,7 +7,13 @@ class CouponArchiveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!method initialize(coupon_id:, request_options: {}) + # @param coupon_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/coupon_fetch_params.rb b/lib/orb/models/coupon_fetch_params.rb index 3824f0385..4fde04978 100644 --- a/lib/orb/models/coupon_fetch_params.rb +++ b/lib/orb/models/coupon_fetch_params.rb @@ -7,7 +7,13 @@ class CouponFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + + # @!method initialize(coupon_id:, request_options: {}) + # @param coupon_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/coupons/subscription_list_params.rb b/lib/orb/models/coupons/subscription_list_params.rb index bca8eca81..795ef298d 100644 --- a/lib/orb/models/coupons/subscription_list_params.rb +++ b/lib/orb/models/coupons/subscription_list_params.rb @@ -8,6 +8,11 @@ class SubscriptionListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute coupon_id + # + # @return [String] + required :coupon_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -21,10 +26,12 @@ class SubscriptionListParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(cursor: nil, limit: nil, request_options: {}) + # @!method initialize(coupon_id:, cursor: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Coupons::SubscriptionListParams} for more details. # + # @param coupon_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/credit_block_delete_params.rb b/lib/orb/models/credit_block_delete_params.rb index f79cfd965..94c2a72c5 100644 --- a/lib/orb/models/credit_block_delete_params.rb +++ b/lib/orb/models/credit_block_delete_params.rb @@ -7,7 +7,13 @@ class CreditBlockDeleteParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute block_id + # + # @return [String] + required :block_id, String + + # @!method initialize(block_id:, request_options: {}) + # @param block_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/credit_block_list_invoices_params.rb b/lib/orb/models/credit_block_list_invoices_params.rb index 53ed70538..d1fbcb40c 100644 --- a/lib/orb/models/credit_block_list_invoices_params.rb +++ b/lib/orb/models/credit_block_list_invoices_params.rb @@ -7,7 +7,13 @@ class CreditBlockListInvoicesParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute block_id + # + # @return [String] + required :block_id, String + + # @!method initialize(block_id:, request_options: {}) + # @param block_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/credit_block_retrieve_params.rb b/lib/orb/models/credit_block_retrieve_params.rb index f06a03877..e7d7f81a6 100644 --- a/lib/orb/models/credit_block_retrieve_params.rb +++ b/lib/orb/models/credit_block_retrieve_params.rb @@ -7,7 +7,13 @@ class CreditBlockRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute block_id + # + # @return [String] + required :block_id, String + + # @!method initialize(block_id:, request_options: {}) + # @param block_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/credit_note_fetch_params.rb b/lib/orb/models/credit_note_fetch_params.rb index 9009371f6..0f74867f7 100644 --- a/lib/orb/models/credit_note_fetch_params.rb +++ b/lib/orb/models/credit_note_fetch_params.rb @@ -7,7 +7,13 @@ class CreditNoteFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute credit_note_id + # + # @return [String] + required :credit_note_id, String + + # @!method initialize(credit_note_id:, request_options: {}) + # @param credit_note_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index b9e003042..44f223586 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -407,6 +407,7 @@ module PaymentProvider STRIPE_CHARGE = :stripe_charge STRIPE_INVOICE = :stripe_invoice NETSUITE = :netsuite + NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] @@ -451,6 +452,7 @@ module ProviderType QUICKBOOKS = :quickbooks NETSUITE = :netsuite + NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] diff --git a/lib/orb/models/customer_create_params.rb b/lib/orb/models/customer_create_params.rb index 62f3e5fb8..d8103da0b 100644 --- a/lib/orb/models/customer_create_params.rb +++ b/lib/orb/models/customer_create_params.rb @@ -397,6 +397,7 @@ module PaymentProvider STRIPE_CHARGE = :stripe_charge STRIPE_INVOICE = :stripe_invoice NETSUITE = :netsuite + NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] diff --git a/lib/orb/models/customer_delete_params.rb b/lib/orb/models/customer_delete_params.rb index ab4a040d0..0ac73b48c 100644 --- a/lib/orb/models/customer_delete_params.rb +++ b/lib/orb/models/customer_delete_params.rb @@ -7,7 +7,13 @@ class CustomerDeleteParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + + # @!method initialize(customer_id:, request_options: {}) + # @param customer_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customer_fetch_by_external_id_params.rb b/lib/orb/models/customer_fetch_by_external_id_params.rb index 3755c6909..c52f28f20 100644 --- a/lib/orb/models/customer_fetch_by_external_id_params.rb +++ b/lib/orb/models/customer_fetch_by_external_id_params.rb @@ -7,7 +7,13 @@ class CustomerFetchByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + + # @!method initialize(external_customer_id:, request_options: {}) + # @param external_customer_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customer_fetch_params.rb b/lib/orb/models/customer_fetch_params.rb index 5c16d7394..d6571dc75 100644 --- a/lib/orb/models/customer_fetch_params.rb +++ b/lib/orb/models/customer_fetch_params.rb @@ -7,7 +7,13 @@ class CustomerFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + + # @!method initialize(customer_id:, request_options: {}) + # @param customer_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb b/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb index cef0da50e..38bfa0176 100644 --- a/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +++ b/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb @@ -7,7 +7,13 @@ class CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIDParams < Orb::Int extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + + # @!method initialize(external_customer_id:, request_options: {}) + # @param external_customer_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb b/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb index 6c1bb699f..c2edd4ae0 100644 --- a/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +++ b/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb @@ -7,7 +7,13 @@ class CustomerSyncPaymentMethodsFromGatewayParams < Orb::Internal::Type::BaseMod extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + + # @!method initialize(customer_id:, request_options: {}) + # @param customer_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end 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 e4533c3c3..b5a23e2d5 100644 --- a/lib/orb/models/customer_update_by_external_id_params.rb +++ b/lib/orb/models/customer_update_by_external_id_params.rb @@ -7,6 +7,11 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute id + # + # @return [String] + required :id, String + # @!attribute accounting_sync_configuration # # @return [Orb::Models::NewAccountingSyncConfiguration, nil] @@ -43,8 +48,10 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel optional :billing_address, -> { Orb::AddressInput }, nil?: true # @!attribute currency - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. # # @return [String, nil] optional :currency, String, nil?: true @@ -287,10 +294,12 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # @return [Orb::Models::CustomerTaxID, nil] optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true - # @!method initialize(accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {}) + # @!method initialize(id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::CustomerUpdateByExternalIDParams} for more details. # + # @param id [String] + # # @param accounting_sync_configuration [Orb::Models::NewAccountingSyncConfiguration, nil] # # @param additional_emails [Array, nil] Additional email addresses for this customer. If populated, these email addresse @@ -301,7 +310,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel # # @param billing_address [Orb::Models::AddressInput, nil] # - # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not + # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c # # @param email [String, nil] A valid customer email, to be used for invoicing and notifications. # @@ -401,6 +410,7 @@ module PaymentProvider STRIPE_CHARGE = :stripe_charge STRIPE_INVOICE = :stripe_invoice NETSUITE = :netsuite + NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] diff --git a/lib/orb/models/customer_update_params.rb b/lib/orb/models/customer_update_params.rb index 618887890..a7e78441d 100644 --- a/lib/orb/models/customer_update_params.rb +++ b/lib/orb/models/customer_update_params.rb @@ -7,6 +7,11 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute accounting_sync_configuration # # @return [Orb::Models::NewAccountingSyncConfiguration, nil] @@ -43,8 +48,10 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel optional :billing_address, -> { Orb::AddressInput }, nil?: true # @!attribute currency - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. # # @return [String, nil] optional :currency, String, nil?: true @@ -281,10 +288,12 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # @return [Orb::Models::CustomerTaxID, nil] optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true - # @!method initialize(accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {}) + # @!method initialize(customer_id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::CustomerUpdateParams} for more details. # + # @param customer_id [String] + # # @param accounting_sync_configuration [Orb::Models::NewAccountingSyncConfiguration, nil] # # @param additional_emails [Array, nil] Additional email addresses for this customer. If populated, these email addresse @@ -295,7 +304,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel # # @param billing_address [Orb::Models::AddressInput, nil] # - # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not + # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c # # @param email [String, nil] A valid customer email, to be used for invoicing and notifications. # @@ -395,6 +404,7 @@ module PaymentProvider STRIPE_CHARGE = :stripe_charge STRIPE_INVOICE = :stripe_invoice NETSUITE = :netsuite + NETSUITE_AMPERSAND = :netsuite_ampersand # @!method self.values # @return [Array] diff --git a/lib/orb/models/customers/balance_transaction_create_params.rb b/lib/orb/models/customers/balance_transaction_create_params.rb index f25b63886..4ec9e67e1 100644 --- a/lib/orb/models/customers/balance_transaction_create_params.rb +++ b/lib/orb/models/customers/balance_transaction_create_params.rb @@ -8,6 +8,11 @@ class BalanceTransactionCreateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute amount # # @return [String] @@ -24,7 +29,9 @@ class BalanceTransactionCreateParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :description, String, nil?: true - # @!method initialize(amount:, type:, description: nil, request_options: {}) + # @!method initialize(customer_id:, amount:, type:, description: nil, request_options: {}) + # @param customer_id [String] + # # @param amount [String] # # @param type [Symbol, Orb::Models::Customers::BalanceTransactionCreateParams::Type] diff --git a/lib/orb/models/customers/balance_transaction_list_params.rb b/lib/orb/models/customers/balance_transaction_list_params.rb index 196161994..4551b4cda 100644 --- a/lib/orb/models/customers/balance_transaction_list_params.rb +++ b/lib/orb/models/customers/balance_transaction_list_params.rb @@ -8,6 +8,11 @@ class BalanceTransactionListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -41,10 +46,12 @@ class BalanceTransactionListParams < Orb::Internal::Type::BaseModel # @return [Time, nil] optional :operation_time_lte, Time, nil?: true - # @!method initialize(cursor: nil, limit: nil, operation_time_gt: nil, operation_time_gte: nil, operation_time_lt: nil, operation_time_lte: nil, request_options: {}) + # @!method initialize(customer_id:, cursor: nil, limit: nil, operation_time_gt: nil, operation_time_gte: nil, operation_time_lt: nil, operation_time_lte: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::BalanceTransactionListParams} for more details. # + # @param customer_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/customers/cost_list_by_external_id_params.rb b/lib/orb/models/customers/cost_list_by_external_id_params.rb index 8a3dc174a..7274e98d1 100644 --- a/lib/orb/models/customers/cost_list_by_external_id_params.rb +++ b/lib/orb/models/customers/cost_list_by_external_id_params.rb @@ -8,6 +8,11 @@ class CostListByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute currency # The currency or custom pricing unit to use. # @@ -35,10 +40,12 @@ class CostListByExternalIDParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::Customers::CostListByExternalIDParams::ViewMode, nil] optional :view_mode, enum: -> { Orb::Customers::CostListByExternalIDParams::ViewMode }, nil?: true - # @!method initialize(currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) + # @!method initialize(external_customer_id:, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::CostListByExternalIDParams} for more details. # + # @param external_customer_id [String] + # # @param currency [String, nil] The currency or custom pricing unit to use. # # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`. diff --git a/lib/orb/models/customers/cost_list_params.rb b/lib/orb/models/customers/cost_list_params.rb index 3e3d338a0..922364935 100644 --- a/lib/orb/models/customers/cost_list_params.rb +++ b/lib/orb/models/customers/cost_list_params.rb @@ -8,6 +8,11 @@ class CostListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute currency # The currency or custom pricing unit to use. # @@ -35,10 +40,12 @@ class CostListParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::Customers::CostListParams::ViewMode, nil] optional :view_mode, enum: -> { Orb::Customers::CostListParams::ViewMode }, nil?: true - # @!method initialize(currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) + # @!method initialize(customer_id:, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::CostListParams} for more details. # + # @param customer_id [String] + # # @param currency [String, nil] The currency or custom pricing unit to use. # # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`. diff --git a/lib/orb/models/customers/credit_list_by_external_id_params.rb b/lib/orb/models/customers/credit_list_by_external_id_params.rb index 84c992f7d..875f7b85c 100644 --- a/lib/orb/models/customers/credit_list_by_external_id_params.rb +++ b/lib/orb/models/customers/credit_list_by_external_id_params.rb @@ -8,6 +8,11 @@ class CreditListByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute currency # The ledger currency or custom pricing unit to use. # @@ -54,10 +59,12 @@ class CreditListByExternalIDParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(currency: nil, cursor: nil, effective_date_gt: nil, effective_date_gte: nil, effective_date_lt: nil, effective_date_lte: nil, include_all_blocks: nil, limit: nil, request_options: {}) + # @!method initialize(external_customer_id:, currency: nil, cursor: nil, effective_date_gt: nil, effective_date_gte: nil, effective_date_lt: nil, effective_date_lte: nil, include_all_blocks: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::CreditListByExternalIDParams} for more details. # + # @param external_customer_id [String] + # # @param currency [String, nil] The ledger currency or custom pricing unit to use. # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned diff --git a/lib/orb/models/customers/credit_list_params.rb b/lib/orb/models/customers/credit_list_params.rb index 7e1bde0dd..1b498f6d3 100644 --- a/lib/orb/models/customers/credit_list_params.rb +++ b/lib/orb/models/customers/credit_list_params.rb @@ -8,6 +8,11 @@ class CreditListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute currency # The ledger currency or custom pricing unit to use. # @@ -54,10 +59,12 @@ class CreditListParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(currency: nil, cursor: nil, effective_date_gt: nil, effective_date_gte: nil, effective_date_lt: nil, effective_date_lte: nil, include_all_blocks: nil, limit: nil, request_options: {}) + # @!method initialize(customer_id:, currency: nil, cursor: nil, effective_date_gt: nil, effective_date_gte: nil, effective_date_lt: nil, effective_date_lte: nil, include_all_blocks: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::CreditListParams} for more details. # + # @param customer_id [String] + # # @param currency [String, nil] The ledger currency or custom pricing unit to use. # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned 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 ab7edc34d..d5bde5a2a 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 @@ -9,336 +9,603 @@ class LedgerCreateEntryByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!attribute amount - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - # - # @return [Float] - required :amount, Float - - # @!attribute entry_type - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType] - required :entry_type, enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType } - - # @!attribute currency - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute description - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - # - # @return [String, nil] - optional :description, String, nil?: true - - # @!attribute effective_date - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - # - # @return [Time, nil] - optional :effective_date, Time, nil?: true - - # @!attribute expiry_date - # An ISO 8601 format date that identifies the origination credit block to expire - # - # @return [Time, nil] - optional :expiry_date, Time, nil?: true - - # @!attribute filters - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - # - # @return [Array, nil] - optional :filters, - -> { - Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter] - }, - nil?: true - - # @!attribute invoice_settings - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - # - # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] - optional :invoice_settings, - -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings }, - 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 - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - # - # @return [String, nil] - optional :per_unit_cost_basis, String, nil?: true - - # @!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. - # - # @return [Date] - required :target_expiry_date, Date - - # @!attribute block_id - # The ID of the block to reverse a decrement from. + # @!attribute external_customer_id # # @return [String] - required :block_id, String + required :external_customer_id, String - # @!attribute void_reason - # Can only be specified when `entry_type=void`. The reason for the void. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] - optional :void_reason, - enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason }, - nil?: true - - # @!method initialize(amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more - # details. - # - # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre - # - # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType] - # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @!attribute body # - # @param block_id [String] The ID of the block to reverse a decrement from. - # - # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r - # - # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. - # - # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai - # - # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire - # - # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec - # - # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde - # - # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur - # - # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. - # - # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] - - module EntryType - extend Orb::Internal::Type::Enum + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment] + required :body, union: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body } - AMENDMENT = :amendment - - # @!method self.values - # @return [Array] - end + # @!method initialize(external_customer_id:, body:, request_options: {}) + # @param external_customer_id [String] + # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment] + # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] - class Filter < Orb::Internal::Type::BaseModel - # @!attribute field - # The property of the price the block applies to. Only item_id is supported. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field] - required :field, enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field } - - # @!attribute operator - # Should prices that match the filter be included or excluded. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator] - required :operator, - enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::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:) - # A PriceFilter that only allows item_id field for block filters. - # - # @param field [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field] The property of the price the block applies to. Only item_id is supported. - # - # @param operator [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::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 the block applies to. Only item_id is supported. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter#field - module Field - extend Orb::Internal::Type::Enum - - ITEM_ID = :item_id - - # @!method self.values - # @return [Array] + module Body + extend Orb::Internal::Type::Union + + discriminator :entry_type + + variant :increment, -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment } + + variant :decrement, -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement } + + variant :expiration_change, + -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange } + + variant :void, -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void } + + variant :amendment, -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment } + + class Increment < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute effective_date + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + # + # @return [Time, nil] + optional :effective_date, Time, nil?: true + + # @!attribute expiry_date + # An ISO 8601 format date that denotes when this credit balance should expire. + # + # @return [Time, nil] + optional :expiry_date, Time, nil?: true + + # @!attribute filters + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + # + # @return [Array, nil] + optional :filters, + -> { + Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter] + }, + nil?: true + + # @!attribute invoice_settings + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings, nil] + optional :invoice_settings, + -> { + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings + }, + 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 + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + # + # @return [String, nil] + optional :per_unit_cost_basis, String, nil?: true + + # @!method initialize(amount:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, entry_type: :increment) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment} + # for more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai + # + # @param expiry_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should expire. + # + # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec + # + # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde + # + # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur + # + # @param entry_type [Symbol, :increment] + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price the block applies to. Only item_id is supported. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field] + required :field, + enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator] + required :operator, + enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::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:) + # A PriceFilter that only allows item_id field for block filters. + # + # @param field [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field] The property of the price the block applies to. Only item_id is supported. + # + # @param operator [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::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 the block applies to. Only item_id is supported. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter#field + module Field + extend Orb::Internal::Type::Enum + + ITEM_ID = :item_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment#invoice_settings + class InvoiceSettings < Orb::Internal::Type::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::Internal::Type::Boolean + + # @!attribute custom_due_date + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + # + # @return [Date, Time, nil] + optional :custom_due_date, + union: -> { + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::CustomDueDate + }, + nil?: true + + # @!attribute invoice_date + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + # + # @return [Date, Time, nil] + optional :invoice_date, + union: -> { + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::InvoiceDate + }, + nil?: true + + # @!attribute item_id + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + # + # @return [String, nil] + optional :item_id, String, nil?: true + + # @!attribute mark_as_paid + # If true, the new credits purchase invoice will be marked as paid. + # + # @return [Boolean, nil] + optional :mark_as_paid, Orb::Internal::Type::Boolean + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute net_terms + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + # + # @return [Integer, nil] + optional :net_terms, Integer, nil?: true + + # @!attribute require_successful_payment + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::Internal::Type::Boolean + + # @!method initialize(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings} + # for more details. + # + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + # + # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav + # + # @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca + # + # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu + # + # @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa + # + # @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid. + # + # @param memo [String, nil] An optional memo to display on the invoice. + # + # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas + # + # @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings#custom_due_date + module CustomDueDate + extend Orb::Internal::Type::Union + + variant Date + + variant Time + + # @!method self.variants + # @return [Array(Date, Time)] + end + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings#invoice_date + module InvoiceDate + extend Orb::Internal::Type::Union + + variant Date + + variant Time + + # @!method self.variants + # @return [Array(Date, Time)] + end + end end - # Should prices that match the filter be included or excluded. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter#operator - module Operator - extend Orb::Internal::Type::Enum - - INCLUDES = :includes - EXCLUDES = :excludes - - # @!method self.values - # @return [Array] + class Decrement < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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(amount:, currency: nil, description: nil, metadata: nil, entry_type: :decrement) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement} + # for more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :decrement] end - end - class InvoiceSettings < Orb::Internal::Type::BaseModel - # @!attribute auto_collection - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - # - # @return [Boolean] - required :auto_collection, Orb::Internal::Type::Boolean - - # @!attribute custom_due_date - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - # - # @return [Date, Time, nil] - optional :custom_due_date, - union: -> { - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::CustomDueDate - }, - nil?: true - - # @!attribute invoice_date - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - # - # @return [Date, Time, nil] - optional :invoice_date, - union: -> { - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate - }, - nil?: true - - # @!attribute item_id - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - # - # @return [String, nil] - optional :item_id, String, nil?: true - - # @!attribute mark_as_paid - # If true, the new credits purchase invoice will be marked as paid. - # - # @return [Boolean, nil] - optional :mark_as_paid, Orb::Internal::Type::Boolean - - # @!attribute memo - # An optional memo to display on the invoice. - # - # @return [String, nil] - optional :memo, String, nil?: true - - # @!attribute net_terms - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - # - # @return [Integer, nil] - optional :net_terms, Integer, nil?: true - - # @!attribute require_successful_payment - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - # - # @return [Boolean, nil] - optional :require_successful_payment, Orb::Internal::Type::Boolean - - # @!method initialize(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings} - # for more details. - # - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - # - # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav - # - # @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca - # - # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu - # - # @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa - # - # @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid. - # - # @param memo [String, nil] An optional memo to display on the invoice. - # - # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas - # - # @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai - - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings#custom_due_date - module CustomDueDate - extend Orb::Internal::Type::Union - - variant Date - - variant Time - - # @!method self.variants - # @return [Array(Date, Time)] + class ExpirationChange < Orb::Internal::Type::BaseModel + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + 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. + # + # @return [Date] + required :target_expiry_date, Date + + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float, nil] + optional :amount, Float, nil?: true + + # @!attribute block_id + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + # + # @return [String, nil] + optional :block_id, String, nil?: true + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute expiry_date + # An ISO 8601 format date that identifies the origination credit block to expire + # + # @return [Time, nil] + optional :expiry_date, Time, 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(target_expiry_date:, amount: nil, block_id: nil, currency: nil, description: nil, expiry_date: nil, metadata: nil, entry_type: :expiration_change) + # Some parameter documentations has been truncated, see + # {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 amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String, nil] The ID of the block affected by an expiration_change, used to differentiate betw + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :expiration_change] end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings#invoice_date - module InvoiceDate - extend Orb::Internal::Type::Union - - variant Date - - variant Time - - # @!method self.variants - # @return [Array(Date, Time)] + class Void < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute block_id + # The ID of the block to void. + # + # @return [String] + required :block_id, String + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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 void_reason + # Can only be specified when `entry_type=void`. The reason for the void. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason, nil] + optional :void_reason, + enum: -> { + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason + }, + nil?: true + + # @!method initialize(amount:, block_id:, currency: nil, description: nil, metadata: nil, void_reason: nil, entry_type: :void) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void} + # for more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String] The ID of the block to void. + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. + # + # @param entry_type [Symbol, :void] + + # Can only be specified when `entry_type=void`. The reason for the void. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void#void_reason + module VoidReason + extend Orb::Internal::Type::Enum + + REFUND = :refund + + # @!method self.values + # @return [Array] + end end - end - - # Can only be specified when `entry_type=void`. The reason for the void. - module VoidReason - extend Orb::Internal::Type::Enum - REFUND = :refund + class Amendment < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + # + # @return [Float] + required :amount, Float + + # @!attribute block_id + # The ID of the block to reverse a decrement from. + # + # @return [String] + required :block_id, String + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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(amount:, block_id:, currency: nil, description: nil, metadata: nil, entry_type: :amendment) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment} + # for more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String] The ID of the block to reverse a decrement from. + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :amendment] + end - # @!method self.values - # @return [Array] + # @!method self.variants + # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment)] end end end 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 ff4ced7d8..adc35aa77 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_params.rb @@ -9,334 +9,601 @@ class LedgerCreateEntryParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!attribute amount - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - # - # @return [Float] - required :amount, Float - - # @!attribute entry_type - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType] - required :entry_type, enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::EntryType } - - # @!attribute currency - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - # - # @return [String, nil] - optional :currency, String, nil?: true - - # @!attribute description - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - # - # @return [String, nil] - optional :description, String, nil?: true - - # @!attribute effective_date - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - # - # @return [Time, nil] - optional :effective_date, Time, nil?: true - - # @!attribute expiry_date - # An ISO 8601 format date that identifies the origination credit block to expire - # - # @return [Time, nil] - optional :expiry_date, Time, nil?: true - - # @!attribute filters - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - # - # @return [Array, nil] - optional :filters, - -> { - Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryParams::Filter] - }, - nil?: true - - # @!attribute invoice_settings - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - # - # @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] - optional :invoice_settings, - -> { Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings }, - 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 - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - # - # @return [String, nil] - optional :per_unit_cost_basis, String, nil?: true - - # @!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. - # - # @return [Date] - required :target_expiry_date, Date - - # @!attribute block_id - # The ID of the block to reverse a decrement from. + # @!attribute customer_id # # @return [String] - required :block_id, String + required :customer_id, String - # @!attribute void_reason - # Can only be specified when `entry_type=void`. The reason for the void. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] - optional :void_reason, - enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason }, - nil?: true - - # @!method initialize(amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details. - # - # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre - # - # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType] - # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot + # @!attribute body # - # @param block_id [String] The ID of the block to reverse a decrement from. - # - # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r - # - # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. - # - # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai - # - # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire - # - # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec - # - # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde - # - # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur - # - # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. - # - # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] - - module EntryType - extend Orb::Internal::Type::Enum + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment] + required :body, union: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body } - AMENDMENT = :amendment - - # @!method self.values - # @return [Array] - end + # @!method initialize(customer_id:, body:, request_options: {}) + # @param customer_id [String] + # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment] + # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] - class Filter < Orb::Internal::Type::BaseModel - # @!attribute field - # The property of the price the block applies to. Only item_id is supported. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::Field] - required :field, enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field } - - # @!attribute operator - # Should prices that match the filter be included or excluded. - # - # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::Operator] - required :operator, enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Filter::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:) - # A PriceFilter that only allows item_id field for block filters. - # - # @param field [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::Field] The property of the price the block applies to. Only item_id is supported. - # - # @param operator [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::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 the block applies to. Only item_id is supported. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter#field - module Field - extend Orb::Internal::Type::Enum - - ITEM_ID = :item_id - - # @!method self.values - # @return [Array] + module Body + extend Orb::Internal::Type::Union + + discriminator :entry_type + + variant :increment, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment } + + variant :decrement, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement } + + variant :expiration_change, + -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange } + + variant :void, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void } + + variant :amendment, -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment } + + class Increment < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute entry_type + # + # @return [Symbol, :increment] + required :entry_type, const: :increment + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute effective_date + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + # + # @return [Time, nil] + optional :effective_date, Time, nil?: true + + # @!attribute expiry_date + # An ISO 8601 format date that denotes when this credit balance should expire. + # + # @return [Time, nil] + optional :expiry_date, Time, nil?: true + + # @!attribute filters + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + # + # @return [Array, nil] + optional :filters, + -> { + Orb::Internal::Type::ArrayOf[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter] + }, + nil?: true + + # @!attribute invoice_settings + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + # + # @return [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings, nil] + optional :invoice_settings, + -> { + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings + }, + 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 + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + # + # @return [String, nil] + optional :per_unit_cost_basis, String, nil?: true + + # @!method initialize(amount:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, entry_type: :increment) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment} for + # more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai + # + # @param expiry_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should expire. + # + # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec + # + # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde + # + # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur + # + # @param entry_type [Symbol, :increment] + + class Filter < Orb::Internal::Type::BaseModel + # @!attribute field + # The property of the price the block applies to. Only item_id is supported. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field] + required :field, + enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field } + + # @!attribute operator + # Should prices that match the filter be included or excluded. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator] + required :operator, + enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::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:) + # A PriceFilter that only allows item_id field for block filters. + # + # @param field [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field] The property of the price the block applies to. Only item_id is supported. + # + # @param operator [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::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 the block applies to. Only item_id is supported. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter#field + module Field + extend Orb::Internal::Type::Enum + + ITEM_ID = :item_id + + # @!method self.values + # @return [Array] + end + + # Should prices that match the filter be included or excluded. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter#operator + module Operator + extend Orb::Internal::Type::Enum + + INCLUDES = :includes + EXCLUDES = :excludes + + # @!method self.values + # @return [Array] + end + end + + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment#invoice_settings + class InvoiceSettings < Orb::Internal::Type::BaseModel + # @!attribute auto_collection + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + # + # @return [Boolean] + required :auto_collection, Orb::Internal::Type::Boolean + + # @!attribute custom_due_date + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + # + # @return [Date, Time, nil] + optional :custom_due_date, + union: -> { + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate + }, + nil?: true + + # @!attribute invoice_date + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + # + # @return [Date, Time, nil] + optional :invoice_date, + union: -> { + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate + }, + nil?: true + + # @!attribute item_id + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + # + # @return [String, nil] + optional :item_id, String, nil?: true + + # @!attribute mark_as_paid + # If true, the new credits purchase invoice will be marked as paid. + # + # @return [Boolean, nil] + optional :mark_as_paid, Orb::Internal::Type::Boolean + + # @!attribute memo + # An optional memo to display on the invoice. + # + # @return [String, nil] + optional :memo, String, nil?: true + + # @!attribute net_terms + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + # + # @return [Integer, nil] + optional :net_terms, Integer, nil?: true + + # @!attribute require_successful_payment + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + # + # @return [Boolean, nil] + optional :require_successful_payment, Orb::Internal::Type::Boolean + + # @!method initialize(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings} + # for more details. + # + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + # + # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav + # + # @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca + # + # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu + # + # @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa + # + # @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid. + # + # @param memo [String, nil] An optional memo to display on the invoice. + # + # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas + # + # @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings#custom_due_date + module CustomDueDate + extend Orb::Internal::Type::Union + + variant Date + + variant Time + + # @!method self.variants + # @return [Array(Date, Time)] + end + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings#invoice_date + module InvoiceDate + extend Orb::Internal::Type::Union + + variant Date + + variant Time + + # @!method self.variants + # @return [Array(Date, Time)] + end + end end - # Should prices that match the filter be included or excluded. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter#operator - module Operator - extend Orb::Internal::Type::Enum - - INCLUDES = :includes - EXCLUDES = :excludes - - # @!method self.values - # @return [Array] + class Decrement < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute entry_type + # + # @return [Symbol, :decrement] + required :entry_type, const: :decrement + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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(amount:, currency: nil, description: nil, metadata: nil, entry_type: :decrement) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement} for + # more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :decrement] end - end - class InvoiceSettings < Orb::Internal::Type::BaseModel - # @!attribute auto_collection - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - # - # @return [Boolean] - required :auto_collection, Orb::Internal::Type::Boolean - - # @!attribute custom_due_date - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - # - # @return [Date, Time, nil] - optional :custom_due_date, - union: -> { - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::CustomDueDate - }, - nil?: true - - # @!attribute invoice_date - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - # - # @return [Date, Time, nil] - optional :invoice_date, - union: -> { - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate - }, - nil?: true - - # @!attribute item_id - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - # - # @return [String, nil] - optional :item_id, String, nil?: true - - # @!attribute mark_as_paid - # If true, the new credits purchase invoice will be marked as paid. - # - # @return [Boolean, nil] - optional :mark_as_paid, Orb::Internal::Type::Boolean - - # @!attribute memo - # An optional memo to display on the invoice. - # - # @return [String, nil] - optional :memo, String, nil?: true - - # @!attribute net_terms - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - # - # @return [Integer, nil] - optional :net_terms, Integer, nil?: true - - # @!attribute require_successful_payment - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - # - # @return [Boolean, nil] - optional :require_successful_payment, Orb::Internal::Type::Boolean - - # @!method initialize(auto_collection:, custom_due_date: nil, invoice_date: nil, item_id: nil, mark_as_paid: nil, memo: nil, net_terms: nil, require_successful_payment: nil) - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings} for - # more details. - # - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - # - # @param auto_collection [Boolean] Whether the credits purchase invoice should auto collect with the customer's sav - # - # @param custom_due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca - # - # @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu - # - # @param item_id [String, nil] The ID of the Item to be used for the invoice line item. If not provided, a defa - # - # @param mark_as_paid [Boolean] If true, the new credits purchase invoice will be marked as paid. - # - # @param memo [String, nil] An optional memo to display on the invoice. - # - # @param net_terms [Integer, nil] The net terms determines the due date of the invoice. Due date is calculated bas - # - # @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai - - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings#custom_due_date - module CustomDueDate - extend Orb::Internal::Type::Union - - variant Date - - variant Time - - # @!method self.variants - # @return [Array(Date, Time)] + class ExpirationChange < Orb::Internal::Type::BaseModel + # @!attribute entry_type + # + # @return [Symbol, :expiration_change] + 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. + # + # @return [Date] + required :target_expiry_date, Date + + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float, nil] + optional :amount, Float, nil?: true + + # @!attribute block_id + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + # + # @return [String, nil] + optional :block_id, String, nil?: true + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, String, nil?: true + + # @!attribute expiry_date + # An ISO 8601 format date that identifies the origination credit block to expire + # + # @return [Time, nil] + optional :expiry_date, Time, 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(target_expiry_date:, amount: nil, block_id: nil, currency: nil, description: nil, expiry_date: nil, metadata: nil, entry_type: :expiration_change) + # Some parameter documentations has been truncated, see + # {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 amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String, nil] The ID of the block affected by an expiration_change, used to differentiate betw + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :expiration_change] end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - # - # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings#invoice_date - module InvoiceDate - extend Orb::Internal::Type::Union - - variant Date - - variant Time - - # @!method self.variants - # @return [Array(Date, Time)] + class Void < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + # + # @return [Float] + required :amount, Float + + # @!attribute block_id + # The ID of the block to void. + # + # @return [String] + required :block_id, String + + # @!attribute entry_type + # + # @return [Symbol, :void] + required :entry_type, const: :void + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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 void_reason + # Can only be specified when `entry_type=void`. The reason for the void. + # + # @return [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason, nil] + optional :void_reason, + enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason }, + nil?: true + + # @!method initialize(amount:, block_id:, currency: nil, description: nil, metadata: nil, void_reason: nil, entry_type: :void) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void} for more + # details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String] The ID of the block to void. + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. + # + # @param entry_type [Symbol, :void] + + # Can only be specified when `entry_type=void`. The reason for the void. + # + # @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void#void_reason + module VoidReason + extend Orb::Internal::Type::Enum + + REFUND = :refund + + # @!method self.values + # @return [Array] + end end - end - - # Can only be specified when `entry_type=void`. The reason for the void. - module VoidReason - extend Orb::Internal::Type::Enum - REFUND = :refund + class Amendment < Orb::Internal::Type::BaseModel + # @!attribute amount + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + # + # @return [Float] + required :amount, Float + + # @!attribute block_id + # The ID of the block to reverse a decrement from. + # + # @return [String] + required :block_id, String + + # @!attribute entry_type + # + # @return [Symbol, :amendment] + required :entry_type, const: :amendment + + # @!attribute currency + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + # + # @return [String, nil] + optional :currency, String, nil?: true + + # @!attribute description + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + # + # @return [String, nil] + optional :description, 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(amount:, block_id:, currency: nil, description: nil, metadata: nil, entry_type: :amendment) + # Some parameter documentations has been truncated, see + # {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment} for + # more details. + # + # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre + # + # @param block_id [String] The ID of the block to reverse a decrement from. + # + # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r + # + # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. + # + # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed + # + # @param entry_type [Symbol, :amendment] + end - # @!method self.values - # @return [Array] + # @!method self.variants + # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment)] end end end diff --git a/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb b/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb index 0540826dd..5adecc4c9 100644 --- a/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb @@ -9,6 +9,11 @@ class LedgerListByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute created_at_gt # # @return [Time, nil] @@ -67,11 +72,13 @@ class LedgerListByExternalIDParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :minimum_amount, String, nil?: true - # @!method initialize(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {}) + # @!method initialize(external_customer_id:, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::LedgerListByExternalIDParams} for more # details. # + # @param external_customer_id [String] + # # @param created_at_gt [Time, nil] # # @param created_at_gte [Time, nil] diff --git a/lib/orb/models/customers/credits/ledger_list_params.rb b/lib/orb/models/customers/credits/ledger_list_params.rb index c342fb3f7..9d46d8a2b 100644 --- a/lib/orb/models/customers/credits/ledger_list_params.rb +++ b/lib/orb/models/customers/credits/ledger_list_params.rb @@ -9,6 +9,11 @@ class LedgerListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute created_at_gt # # @return [Time, nil] @@ -67,10 +72,12 @@ class LedgerListParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :minimum_amount, String, nil?: true - # @!method initialize(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {}) + # @!method initialize(customer_id:, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, currency: nil, cursor: nil, entry_status: nil, entry_type: nil, limit: nil, minimum_amount: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::LedgerListParams} for more details. # + # @param customer_id [String] + # # @param created_at_gt [Time, nil] # # @param created_at_gte [Time, nil] diff --git a/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb b/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb index 894f3a24b..98a1228d0 100644 --- a/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb @@ -9,6 +9,11 @@ class TopUpCreateByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute amount # The amount to increment when the threshold is reached. # @@ -63,11 +68,13 @@ class TopUpCreateByExternalIDParams < Orb::Internal::Type::BaseModel enum: -> { Orb::Customers::Credits::TopUpCreateByExternalIDParams::ExpiresAfterUnit }, nil?: true - # @!method initialize(amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {}) + # @!method initialize(external_customer_id:, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams} for more # details. # + # @param external_customer_id [String] + # # @param amount [String] The amount to increment when the threshold is reached. # # @param currency [String] The currency or custom pricing unit to use for this top-up. If this is a real-wo diff --git a/lib/orb/models/customers/credits/top_up_create_params.rb b/lib/orb/models/customers/credits/top_up_create_params.rb index f9bd87832..8d126dddc 100644 --- a/lib/orb/models/customers/credits/top_up_create_params.rb +++ b/lib/orb/models/customers/credits/top_up_create_params.rb @@ -9,6 +9,11 @@ class TopUpCreateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute amount # The amount to increment when the threshold is reached. # @@ -63,10 +68,12 @@ class TopUpCreateParams < Orb::Internal::Type::BaseModel enum: -> { Orb::Customers::Credits::TopUpCreateParams::ExpiresAfterUnit }, nil?: true - # @!method initialize(amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {}) + # @!method initialize(customer_id:, amount:, currency:, invoice_settings:, per_unit_cost_basis:, threshold:, active_from: nil, expires_after: nil, expires_after_unit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::TopUpCreateParams} for more details. # + # @param customer_id [String] + # # @param amount [String] The amount to increment when the threshold is reached. # # @param currency [String] The currency or custom pricing unit to use for this top-up. If this is a real-wo diff --git a/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb b/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb index 59c032ff1..46dcce9ca 100644 --- a/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb @@ -14,8 +14,14 @@ class TopUpDeleteByExternalIDParams < Orb::Internal::Type::BaseModel # @return [String] required :external_customer_id, String - # @!method initialize(external_customer_id:, request_options: {}) + # @!attribute top_up_id + # + # @return [String] + required :top_up_id, String + + # @!method initialize(external_customer_id:, top_up_id:, request_options: {}) # @param external_customer_id [String] + # @param top_up_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customers/credits/top_up_delete_params.rb b/lib/orb/models/customers/credits/top_up_delete_params.rb index d88c90a59..e6da79643 100644 --- a/lib/orb/models/customers/credits/top_up_delete_params.rb +++ b/lib/orb/models/customers/credits/top_up_delete_params.rb @@ -14,8 +14,14 @@ class TopUpDeleteParams < Orb::Internal::Type::BaseModel # @return [String] required :customer_id, String - # @!method initialize(customer_id:, request_options: {}) + # @!attribute top_up_id + # + # @return [String] + required :top_up_id, String + + # @!method initialize(customer_id:, top_up_id:, request_options: {}) # @param customer_id [String] + # @param top_up_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb b/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb index e1dce3caf..8d4e0766d 100644 --- a/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb @@ -9,6 +9,11 @@ class TopUpListByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_customer_id + # + # @return [String] + required :external_customer_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -22,10 +27,12 @@ class TopUpListByExternalIDParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(cursor: nil, limit: nil, request_options: {}) + # @!method initialize(external_customer_id:, cursor: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::TopUpListByExternalIDParams} for more details. # + # @param external_customer_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/customers/credits/top_up_list_params.rb b/lib/orb/models/customers/credits/top_up_list_params.rb index 179c52eba..9d910fd95 100644 --- a/lib/orb/models/customers/credits/top_up_list_params.rb +++ b/lib/orb/models/customers/credits/top_up_list_params.rb @@ -9,6 +9,11 @@ class TopUpListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute customer_id + # + # @return [String] + required :customer_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -22,10 +27,12 @@ class TopUpListParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(cursor: nil, limit: nil, request_options: {}) + # @!method initialize(customer_id:, cursor: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Customers::Credits::TopUpListParams} for more details. # + # @param customer_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/dimensional_price_group_retrieve_params.rb b/lib/orb/models/dimensional_price_group_retrieve_params.rb index fcbb47927..2a9d03ccf 100644 --- a/lib/orb/models/dimensional_price_group_retrieve_params.rb +++ b/lib/orb/models/dimensional_price_group_retrieve_params.rb @@ -7,7 +7,13 @@ class DimensionalPriceGroupRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + + # @!method initialize(dimensional_price_group_id:, request_options: {}) + # @param dimensional_price_group_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/dimensional_price_group_update_params.rb b/lib/orb/models/dimensional_price_group_update_params.rb index 00c4aaae0..406715141 100644 --- a/lib/orb/models/dimensional_price_group_update_params.rb +++ b/lib/orb/models/dimensional_price_group_update_params.rb @@ -7,6 +7,11 @@ class DimensionalPriceGroupUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute dimensional_price_group_id + # + # @return [String] + required :dimensional_price_group_id, String + # @!attribute external_dimensional_price_group_id # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this @@ -24,10 +29,12 @@ class DimensionalPriceGroupUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(external_dimensional_price_group_id: nil, metadata: nil, request_options: {}) + # @!method initialize(dimensional_price_group_id:, external_dimensional_price_group_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::DimensionalPriceGroupUpdateParams} for more details. # + # @param dimensional_price_group_id [String] + # # @param external_dimensional_price_group_id [String, nil] An optional user-defined ID for this dimensional price group resource, used thro # # @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/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb b/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb index 7277508a4..58ca501eb 100644 --- a/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +++ b/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb @@ -8,7 +8,13 @@ class ExternalDimensionalPriceGroupIDRetrieveParams < Orb::Internal::Type::BaseM extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute external_dimensional_price_group_id + # + # @return [String] + required :external_dimensional_price_group_id, String + + # @!method initialize(external_dimensional_price_group_id:, request_options: {}) + # @param external_dimensional_price_group_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb b/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb index c08033462..f2e95bc51 100644 --- a/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +++ b/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb @@ -8,6 +8,11 @@ class ExternalDimensionalPriceGroupIDUpdateParams < Orb::Internal::Type::BaseMod extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute path_external_dimensional_price_group_id + # + # @return [String] + required :path_external_dimensional_price_group_id, String + # @!attribute body_external_dimensional_price_group_id # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this @@ -28,11 +33,13 @@ class ExternalDimensionalPriceGroupIDUpdateParams < Orb::Internal::Type::BaseMod # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(body_external_dimensional_price_group_id: nil, metadata: nil, request_options: {}) + # @!method initialize(path_external_dimensional_price_group_id:, body_external_dimensional_price_group_id: nil, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::DimensionalPriceGroups::ExternalDimensionalPriceGroupIDUpdateParams} # for more details. # + # @param path_external_dimensional_price_group_id [String] + # # @param body_external_dimensional_price_group_id [String, nil] An optional user-defined ID for this dimensional price group resource, used thro # # @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/event_deprecate_params.rb b/lib/orb/models/event_deprecate_params.rb index 73b8ee81d..b95957573 100644 --- a/lib/orb/models/event_deprecate_params.rb +++ b/lib/orb/models/event_deprecate_params.rb @@ -7,7 +7,13 @@ class EventDeprecateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute event_id + # + # @return [String] + required :event_id, String + + # @!method initialize(event_id:, request_options: {}) + # @param event_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/event_update_params.rb b/lib/orb/models/event_update_params.rb index 247d2af92..87683ee24 100644 --- a/lib/orb/models/event_update_params.rb +++ b/lib/orb/models/event_update_params.rb @@ -7,6 +7,11 @@ class EventUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute event_id + # + # @return [String] + required :event_id, String + # @!attribute event_name # A name to meaningfully identify the action or event type. # @@ -41,10 +46,12 @@ class EventUpdateParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :external_customer_id, String, nil?: true - # @!method initialize(event_name:, properties:, timestamp:, customer_id: nil, external_customer_id: nil, request_options: {}) + # @!method initialize(event_id:, event_name:, properties:, timestamp:, customer_id: nil, external_customer_id: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::EventUpdateParams} for more details. # + # @param event_id [String] + # # @param event_name [String] A name to meaningfully identify the action or event type. # # @param properties [Hash{Symbol=>Object}] A dictionary of custom properties. Values in this dictionary must be numeric, bo diff --git a/lib/orb/models/events/backfill_close_params.rb b/lib/orb/models/events/backfill_close_params.rb index e2324a3e6..732c0e1a0 100644 --- a/lib/orb/models/events/backfill_close_params.rb +++ b/lib/orb/models/events/backfill_close_params.rb @@ -8,7 +8,13 @@ class BackfillCloseParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute backfill_id + # + # @return [String] + required :backfill_id, String + + # @!method initialize(backfill_id:, request_options: {}) + # @param backfill_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/events/backfill_fetch_params.rb b/lib/orb/models/events/backfill_fetch_params.rb index bf503d37a..177d5b424 100644 --- a/lib/orb/models/events/backfill_fetch_params.rb +++ b/lib/orb/models/events/backfill_fetch_params.rb @@ -8,7 +8,13 @@ class BackfillFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute backfill_id + # + # @return [String] + required :backfill_id, String + + # @!method initialize(backfill_id:, request_options: {}) + # @param backfill_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/events/backfill_revert_params.rb b/lib/orb/models/events/backfill_revert_params.rb index 943fb1215..36b0a7008 100644 --- a/lib/orb/models/events/backfill_revert_params.rb +++ b/lib/orb/models/events/backfill_revert_params.rb @@ -8,7 +8,13 @@ class BackfillRevertParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute backfill_id + # + # @return [String] + required :backfill_id, String + + # @!method initialize(backfill_id:, request_options: {}) + # @param backfill_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/invoice_delete_line_item_params.rb b/lib/orb/models/invoice_delete_line_item_params.rb index 09b50178f..26ff4a15a 100644 --- a/lib/orb/models/invoice_delete_line_item_params.rb +++ b/lib/orb/models/invoice_delete_line_item_params.rb @@ -12,8 +12,14 @@ class InvoiceDeleteLineItemParams < Orb::Internal::Type::BaseModel # @return [String] required :invoice_id, String - # @!method initialize(invoice_id:, request_options: {}) + # @!attribute line_item_id + # + # @return [String] + required :line_item_id, String + + # @!method initialize(invoice_id:, line_item_id:, request_options: {}) # @param invoice_id [String] + # @param line_item_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/invoice_fetch_params.rb b/lib/orb/models/invoice_fetch_params.rb index a97bb2fb1..554f07fd5 100644 --- a/lib/orb/models/invoice_fetch_params.rb +++ b/lib/orb/models/invoice_fetch_params.rb @@ -7,7 +7,13 @@ class InvoiceFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + + # @!method initialize(invoice_id:, request_options: {}) + # @param invoice_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/invoice_issue_params.rb b/lib/orb/models/invoice_issue_params.rb index 801023940..0394858c0 100644 --- a/lib/orb/models/invoice_issue_params.rb +++ b/lib/orb/models/invoice_issue_params.rb @@ -7,6 +7,11 @@ class InvoiceIssueParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + # @!attribute synchronous # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices @@ -17,10 +22,12 @@ class InvoiceIssueParams < Orb::Internal::Type::BaseModel # @return [Boolean, nil] optional :synchronous, Orb::Internal::Type::Boolean - # @!method initialize(synchronous: nil, request_options: {}) + # @!method initialize(invoice_id:, synchronous: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::InvoiceIssueParams} for more details. # + # @param invoice_id [String] + # # @param synchronous [Boolean] If true, the invoice will be issued synchronously. If false, the invoice will be # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/invoice_issue_summary_params.rb b/lib/orb/models/invoice_issue_summary_params.rb index 6ffea6430..ab3180ed4 100644 --- a/lib/orb/models/invoice_issue_summary_params.rb +++ b/lib/orb/models/invoice_issue_summary_params.rb @@ -7,6 +7,11 @@ class InvoiceIssueSummaryParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + # @!attribute synchronous # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices @@ -17,10 +22,12 @@ class InvoiceIssueSummaryParams < Orb::Internal::Type::BaseModel # @return [Boolean, nil] optional :synchronous, Orb::Internal::Type::Boolean - # @!method initialize(synchronous: nil, request_options: {}) + # @!method initialize(invoice_id:, synchronous: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::InvoiceIssueSummaryParams} for more details. # + # @param invoice_id [String] + # # @param synchronous [Boolean] If true, the invoice will be issued synchronously. If false, the invoice will be # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/invoice_mark_paid_params.rb b/lib/orb/models/invoice_mark_paid_params.rb index cce952c34..5bc1f384c 100644 --- a/lib/orb/models/invoice_mark_paid_params.rb +++ b/lib/orb/models/invoice_mark_paid_params.rb @@ -7,6 +7,11 @@ class InvoiceMarkPaidParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + # @!attribute payment_received_date # A date string to specify the date of the payment. # @@ -25,7 +30,9 @@ class InvoiceMarkPaidParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :notes, String, nil?: true - # @!method initialize(payment_received_date:, external_id: nil, notes: nil, request_options: {}) + # @!method initialize(invoice_id:, payment_received_date:, external_id: nil, notes: nil, request_options: {}) + # @param invoice_id [String] + # # @param payment_received_date [Date] A date string to specify the date of the payment. # # @param external_id [String, nil] An optional external ID to associate with the payment. diff --git a/lib/orb/models/invoice_pay_params.rb b/lib/orb/models/invoice_pay_params.rb index 08c4da4a9..0a13b7f97 100644 --- a/lib/orb/models/invoice_pay_params.rb +++ b/lib/orb/models/invoice_pay_params.rb @@ -7,7 +7,13 @@ class InvoicePayParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + + # @!method initialize(invoice_id:, request_options: {}) + # @param invoice_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/invoice_update_params.rb b/lib/orb/models/invoice_update_params.rb index ad976891a..95e9455de 100644 --- a/lib/orb/models/invoice_update_params.rb +++ b/lib/orb/models/invoice_update_params.rb @@ -7,6 +7,11 @@ class InvoiceUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + # @!attribute auto_collection # Determines whether this invoice will automatically attempt to charge a saved # payment method, if any. Can only be modified on draft invoices. If not @@ -46,10 +51,12 @@ class InvoiceUpdateParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :net_terms, Integer, nil?: true - # @!method initialize(auto_collection: nil, due_date: nil, invoice_date: nil, metadata: nil, net_terms: nil, request_options: {}) + # @!method initialize(invoice_id:, auto_collection: nil, due_date: nil, invoice_date: nil, metadata: nil, net_terms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::InvoiceUpdateParams} for more details. # + # @param invoice_id [String] + # # @param auto_collection [Boolean, nil] Determines whether this invoice will automatically attempt to charge a saved pay # # @param due_date [Date, Time, nil] An optional custom due date for the invoice. If not set, the due date will be ca diff --git a/lib/orb/models/invoice_void_params.rb b/lib/orb/models/invoice_void_params.rb index 54a3dbeb1..484e624f4 100644 --- a/lib/orb/models/invoice_void_params.rb +++ b/lib/orb/models/invoice_void_params.rb @@ -7,7 +7,13 @@ class InvoiceVoidParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute invoice_id + # + # @return [String] + required :invoice_id, String + + # @!method initialize(invoice_id:, request_options: {}) + # @param invoice_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/item_archive_params.rb b/lib/orb/models/item_archive_params.rb index d7edf8dea..13390f098 100644 --- a/lib/orb/models/item_archive_params.rb +++ b/lib/orb/models/item_archive_params.rb @@ -7,7 +7,13 @@ class ItemArchiveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute item_id + # + # @return [String] + required :item_id, String + + # @!method initialize(item_id:, request_options: {}) + # @param item_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/item_fetch_params.rb b/lib/orb/models/item_fetch_params.rb index 90e07247c..aa933d73f 100644 --- a/lib/orb/models/item_fetch_params.rb +++ b/lib/orb/models/item_fetch_params.rb @@ -7,7 +7,13 @@ class ItemFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute item_id + # + # @return [String] + required :item_id, String + + # @!method initialize(item_id:, request_options: {}) + # @param item_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/item_update_params.rb b/lib/orb/models/item_update_params.rb index c895a947b..fe159bc26 100644 --- a/lib/orb/models/item_update_params.rb +++ b/lib/orb/models/item_update_params.rb @@ -7,6 +7,11 @@ class ItemUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute item_id + # + # @return [String] + required :item_id, String + # @!attribute external_connections # # @return [Array, nil] @@ -27,10 +32,12 @@ class ItemUpdateParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :name, String, nil?: true - # @!method initialize(external_connections: nil, metadata: nil, name: nil, request_options: {}) + # @!method initialize(item_id:, external_connections: nil, metadata: nil, name: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::ItemUpdateParams} for more details. # + # @param item_id [String] + # # @param external_connections [Array, 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/license_deactivate_params.rb b/lib/orb/models/license_deactivate_params.rb index d10648de0..4d06fba7d 100644 --- a/lib/orb/models/license_deactivate_params.rb +++ b/lib/orb/models/license_deactivate_params.rb @@ -7,6 +7,11 @@ class LicenseDeactivateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute license_id + # + # @return [String] + required :license_id, String + # @!attribute end_date # The date to deactivate the license. If not provided, defaults to end of day # today in the customer's timezone. @@ -14,10 +19,12 @@ class LicenseDeactivateParams < Orb::Internal::Type::BaseModel # @return [Date, nil] optional :end_date, Date, nil?: true - # @!method initialize(end_date: nil, request_options: {}) + # @!method initialize(license_id:, end_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::LicenseDeactivateParams} for more details. # + # @param license_id [String] + # # @param end_date [Date, nil] The date to deactivate the license. If not provided, defaults to end of day toda # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/license_retrieve_by_external_id_params.rb b/lib/orb/models/license_retrieve_by_external_id_params.rb index 78b669257..a593e1dc6 100644 --- a/lib/orb/models/license_retrieve_by_external_id_params.rb +++ b/lib/orb/models/license_retrieve_by_external_id_params.rb @@ -7,6 +7,11 @@ class LicenseRetrieveByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_license_id + # + # @return [String] + required :external_license_id, String + # @!attribute license_type_id # The ID of the license type to fetch the license for. # @@ -19,7 +24,9 @@ class LicenseRetrieveByExternalIDParams < Orb::Internal::Type::BaseModel # @return [String] required :subscription_id, String - # @!method initialize(license_type_id:, subscription_id:, request_options: {}) + # @!method initialize(external_license_id:, license_type_id:, subscription_id:, request_options: {}) + # @param external_license_id [String] + # # @param license_type_id [String] The ID of the license type to fetch the license for. # # @param subscription_id [String] The ID of the subscription to fetch the license for. diff --git a/lib/orb/models/license_retrieve_params.rb b/lib/orb/models/license_retrieve_params.rb index 42ddd1f71..f2da8ec87 100644 --- a/lib/orb/models/license_retrieve_params.rb +++ b/lib/orb/models/license_retrieve_params.rb @@ -7,7 +7,13 @@ class LicenseRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute license_id + # + # @return [String] + required :license_id, String + + # @!method initialize(license_id:, request_options: {}) + # @param license_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/license_type_retrieve_params.rb b/lib/orb/models/license_type_retrieve_params.rb index 93f256255..5879dec10 100644 --- a/lib/orb/models/license_type_retrieve_params.rb +++ b/lib/orb/models/license_type_retrieve_params.rb @@ -7,7 +7,13 @@ class LicenseTypeRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute license_type_id + # + # @return [String] + required :license_type_id, String + + # @!method initialize(license_type_id:, request_options: {}) + # @param license_type_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/licenses/external_license_get_usage_params.rb b/lib/orb/models/licenses/external_license_get_usage_params.rb index 88ac962ac..efeb92cc5 100644 --- a/lib/orb/models/licenses/external_license_get_usage_params.rb +++ b/lib/orb/models/licenses/external_license_get_usage_params.rb @@ -8,6 +8,11 @@ class ExternalLicenseGetUsageParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_license_id + # + # @return [String] + required :external_license_id, String + # @!attribute license_type_id # The license type ID to filter licenses by. # @@ -53,10 +58,12 @@ class ExternalLicenseGetUsageParams < Orb::Internal::Type::BaseModel # @return [Date, nil] optional :start_date, Date, nil?: true - # @!method initialize(license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) + # @!method initialize(external_license_id:, license_type_id:, subscription_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Licenses::ExternalLicenseGetUsageParams} for more details. # + # @param external_license_id [String] + # # @param license_type_id [String] The license type ID to filter licenses by. # # @param subscription_id [String] The subscription ID to get license usage for. diff --git a/lib/orb/models/licenses/usage_get_usage_params.rb b/lib/orb/models/licenses/usage_get_usage_params.rb index 166064822..9b9ca0bdb 100644 --- a/lib/orb/models/licenses/usage_get_usage_params.rb +++ b/lib/orb/models/licenses/usage_get_usage_params.rb @@ -8,6 +8,11 @@ class UsageGetUsageParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute license_id + # + # @return [String] + required :license_id, String + # @!attribute cursor # Pagination cursor from a previous request. # @@ -41,10 +46,12 @@ class UsageGetUsageParams < Orb::Internal::Type::BaseModel # @return [Date, nil] optional :start_date, Date, nil?: true - # @!method initialize(cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) + # @!method initialize(license_id:, cursor: nil, end_date: nil, group_by: nil, limit: nil, start_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Licenses::UsageGetUsageParams} for more details. # + # @param license_id [String] + # # @param cursor [String, nil] Pagination cursor from a previous request. # # @param end_date [Date, nil] End date for the usage period (YYYY-MM-DD). Defaults to end of current billing p diff --git a/lib/orb/models/metric_fetch_params.rb b/lib/orb/models/metric_fetch_params.rb index 68efa2693..8734952b6 100644 --- a/lib/orb/models/metric_fetch_params.rb +++ b/lib/orb/models/metric_fetch_params.rb @@ -7,7 +7,13 @@ class MetricFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute metric_id + # + # @return [String] + required :metric_id, String + + # @!method initialize(metric_id:, request_options: {}) + # @param metric_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/metric_update_params.rb b/lib/orb/models/metric_update_params.rb index 626fd5048..8c39d3f60 100644 --- a/lib/orb/models/metric_update_params.rb +++ b/lib/orb/models/metric_update_params.rb @@ -7,6 +7,11 @@ class MetricUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute metric_id + # + # @return [String] + required :metric_id, String + # @!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 @@ -15,10 +20,12 @@ class MetricUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(metadata: nil, request_options: {}) + # @!method initialize(metric_id:, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::MetricUpdateParams} for more details. # + # @param metric_id [String] + # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index 3464e3cf3..a08ff78ae 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -111,6 +111,14 @@ class Price < Orb::Internal::Type::BaseModel # @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::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] + optional :license_allocation_price, + union: -> { Orb::PlanCreateParams::Price::LicenseAllocationPrice }, + nil?: true + # @!attribute plan_phase_order # The phase to add this price to. # @@ -123,13 +131,8506 @@ class Price < Orb::Internal::Type::BaseModel # @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] optional :price, union: -> { Orb::PlanCreateParams::Price::Price }, nil?: true - # @!method initialize(allocation_price: nil, plan_phase_order: nil, price: nil) + # @!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 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 + 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. + # + # @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 + + # @!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::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::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 + # + # @param model_type [Symbol, :event_output] The pricing model type + + # The cadence to bill for this price on. + # + # @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 + + # @!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::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. # # @see Orb::Models::PlanCreateParams::Price#price diff --git a/lib/orb/models/plan_fetch_params.rb b/lib/orb/models/plan_fetch_params.rb index 45ef1f067..0920276d9 100644 --- a/lib/orb/models/plan_fetch_params.rb +++ b/lib/orb/models/plan_fetch_params.rb @@ -7,7 +7,13 @@ class PlanFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute plan_id + # + # @return [String] + required :plan_id, String + + # @!method initialize(plan_id:, request_options: {}) + # @param plan_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/plan_update_params.rb b/lib/orb/models/plan_update_params.rb index d94c2c9d5..7a60ace7f 100644 --- a/lib/orb/models/plan_update_params.rb +++ b/lib/orb/models/plan_update_params.rb @@ -7,6 +7,11 @@ class PlanUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute plan_id + # + # @return [String] + required :plan_id, String + # @!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 @@ -23,10 +28,12 @@ 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(external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(plan_id:, 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 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_fetch_params.rb b/lib/orb/models/plans/external_plan_id_fetch_params.rb index 1944b37de..c4662c321 100644 --- a/lib/orb/models/plans/external_plan_id_fetch_params.rb +++ b/lib/orb/models/plans/external_plan_id_fetch_params.rb @@ -8,7 +8,13 @@ class ExternalPlanIDFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute external_plan_id + # + # @return [String] + required :external_plan_id, String + + # @!method initialize(external_plan_id:, request_options: {}) + # @param external_plan_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end 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 588fe8cfc..9a1aa5df8 100644 --- a/lib/orb/models/plans/external_plan_id_update_params.rb +++ b/lib/orb/models/plans/external_plan_id_update_params.rb @@ -8,6 +8,11 @@ class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute other_external_plan_id + # + # @return [String] + required :other_external_plan_id, String + # @!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 @@ -24,10 +29,12 @@ 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(external_plan_id: nil, metadata: nil, request_options: {}) + # @!method initialize(other_external_plan_id:, 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 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/migration_cancel_params.rb b/lib/orb/models/plans/migration_cancel_params.rb index 682cea0ae..f30088c44 100644 --- a/lib/orb/models/plans/migration_cancel_params.rb +++ b/lib/orb/models/plans/migration_cancel_params.rb @@ -13,8 +13,14 @@ class MigrationCancelParams < Orb::Internal::Type::BaseModel # @return [String] required :plan_id, String - # @!method initialize(plan_id:, request_options: {}) + # @!attribute migration_id + # + # @return [String] + required :migration_id, String + + # @!method initialize(plan_id:, migration_id:, request_options: {}) # @param plan_id [String] + # @param migration_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/plans/migration_list_params.rb b/lib/orb/models/plans/migration_list_params.rb index 0166c3c16..835d551f8 100644 --- a/lib/orb/models/plans/migration_list_params.rb +++ b/lib/orb/models/plans/migration_list_params.rb @@ -8,6 +8,11 @@ class MigrationListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute plan_id + # + # @return [String] + required :plan_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -21,10 +26,12 @@ class MigrationListParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :limit, Integer - # @!method initialize(cursor: nil, limit: nil, request_options: {}) + # @!method initialize(plan_id:, cursor: nil, limit: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Plans::MigrationListParams} for more details. # + # @param plan_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/plans/migration_retrieve_params.rb b/lib/orb/models/plans/migration_retrieve_params.rb index 0ed38052d..a85fbc19d 100644 --- a/lib/orb/models/plans/migration_retrieve_params.rb +++ b/lib/orb/models/plans/migration_retrieve_params.rb @@ -13,8 +13,14 @@ class MigrationRetrieveParams < Orb::Internal::Type::BaseModel # @return [String] required :plan_id, String - # @!method initialize(plan_id:, request_options: {}) + # @!attribute migration_id + # + # @return [String] + required :migration_id, String + + # @!method initialize(plan_id:, migration_id:, request_options: {}) # @param plan_id [String] + # @param migration_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index f0a250ea0..ff7703d6f 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -7,1541 +7,1169 @@ class PriceCreateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!attribute cadence - # The cadence to bill for this price on. + # @!attribute body + # New floating price request body params. # - # @return [Symbol, Orb::Models::PriceCreateParams::Cadence] - required :cadence, enum: -> { Orb::PriceCreateParams::Cadence } + # @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] + required :body, union: -> { Orb::PriceCreateParams::Body } - # @!attribute currency - # An ISO 4217 currency string for which this price is billed in. + # @!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. # - # @return [String] - required :currency, String + # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] - # @!attribute item_id - # The id of the item the price will be associated with. - # - # @return [String] - required :item_id, String + # New floating price request body params. + module Body + extend Orb::Internal::Type::Union - # @!attribute model_type - # The pricing model type - # - # @return [Symbol, Orb::Models::PriceCreateParams::ModelType] - required :model_type, enum: -> { Orb::PriceCreateParams::ModelType } + discriminator :model_type - # @!attribute name - # The name of the price. - # - # @return [String] - required :name, String + variant :unit, -> { Orb::NewFloatingUnitPrice } - # @!attribute unit_config - # Configuration for unit pricing - # - # @return [Orb::Models::UnitConfig] - required :unit_config, -> { Orb::UnitConfig } + variant :tiered, -> { Orb::NewFloatingTieredPrice } - # @!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 + variant :bulk, -> { Orb::NewFloatingBulkPrice } - # @!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 + variant :bulk_with_filters, -> { Orb::PriceCreateParams::Body::BulkWithFilters } - # @!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 + variant :package, -> { Orb::NewFloatingPackagePrice } - # @!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 + variant :matrix, -> { Orb::NewFloatingMatrixPrice } - # @!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::ConversionRateConfig }, nil?: true + variant :threshold_total_amount, -> { Orb::NewFloatingThresholdTotalAmountPrice } - # @!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 + variant :tiered_package, -> { Orb::NewFloatingTieredPackagePrice } - # @!attribute external_price_id - # An alias for the price. - # - # @return [String, nil] - optional :external_price_id, String, nil?: true + variant :tiered_with_minimum, -> { Orb::NewFloatingTieredWithMinimumPrice } - # @!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 + variant :grouped_tiered, -> { Orb::NewFloatingGroupedTieredPrice } - # @!attribute invoice_grouping_key - # The property used to group this price on an invoice - # - # @return [String, nil] - optional :invoice_grouping_key, String, nil?: true + variant :tiered_package_with_minimum, -> { Orb::NewFloatingTieredPackageWithMinimumPrice } - # @!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 + variant :package_with_allocation, -> { Orb::NewFloatingPackageWithAllocationPrice } - # @!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 + variant :unit_with_percent, -> { Orb::NewFloatingUnitWithPercentPrice } - # @!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 + variant :matrix_with_allocation, -> { Orb::NewFloatingMatrixWithAllocationPrice } - # @!attribute tiered_config - # Configuration for tiered pricing - # - # @return [Orb::Models::TieredConfig] - required :tiered_config, -> { Orb::TieredConfig } + variant :tiered_with_proration, -> { Orb::NewFloatingTieredWithProrationPrice } - # @!attribute bulk_config - # Configuration for bulk pricing - # - # @return [Orb::Models::BulkConfig] - required :bulk_config, -> { Orb::BulkConfig } + variant :unit_with_proration, -> { Orb::NewFloatingUnitWithProrationPrice } - # @!attribute bulk_with_filters_config - # Configuration for bulk_with_filters pricing - # - # @return [Orb::Models::PriceCreateParams::BulkWithFiltersConfig] - required :bulk_with_filters_config, -> { Orb::PriceCreateParams::BulkWithFiltersConfig } + variant :grouped_allocation, -> { Orb::NewFloatingGroupedAllocationPrice } - # @!attribute package_config - # Configuration for package pricing - # - # @return [Orb::Models::PackageConfig] - required :package_config, -> { Orb::PackageConfig } + variant :bulk_with_proration, -> { Orb::NewFloatingBulkWithProrationPrice } - # @!attribute matrix_config - # Configuration for matrix pricing - # - # @return [Orb::Models::MatrixConfig] - required :matrix_config, -> { Orb::MatrixConfig } + variant :grouped_with_prorated_minimum, -> { Orb::NewFloatingGroupedWithProratedMinimumPrice } - # @!attribute threshold_total_amount_config - # Configuration for threshold_total_amount pricing - # - # @return [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig] - required :threshold_total_amount_config, -> { Orb::PriceCreateParams::ThresholdTotalAmountConfig } + variant :grouped_with_metered_minimum, -> { Orb::NewFloatingGroupedWithMeteredMinimumPrice } - # @!attribute tiered_package_config - # Configuration for tiered_package pricing - # - # @return [Orb::Models::PriceCreateParams::TieredPackageConfig] - required :tiered_package_config, -> { Orb::PriceCreateParams::TieredPackageConfig } + variant :grouped_with_min_max_thresholds, -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds } - # @!attribute tiered_with_minimum_config - # Configuration for tiered_with_minimum pricing - # - # @return [Orb::Models::PriceCreateParams::TieredWithMinimumConfig] - required :tiered_with_minimum_config, -> { Orb::PriceCreateParams::TieredWithMinimumConfig } + variant :matrix_with_display_name, -> { Orb::NewFloatingMatrixWithDisplayNamePrice } - # @!attribute grouped_tiered_config - # Configuration for grouped_tiered pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedTieredConfig] - required :grouped_tiered_config, -> { Orb::PriceCreateParams::GroupedTieredConfig } + variant :grouped_tiered_package, -> { Orb::NewFloatingGroupedTieredPackagePrice } - # @!attribute tiered_package_with_minimum_config - # Configuration for tiered_package_with_minimum pricing - # - # @return [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig] - required :tiered_package_with_minimum_config, - -> { Orb::PriceCreateParams::TieredPackageWithMinimumConfig } + variant :max_group_tiered_package, -> { Orb::NewFloatingMaxGroupTieredPackagePrice } - # @!attribute package_with_allocation_config - # Configuration for package_with_allocation pricing - # - # @return [Orb::Models::PriceCreateParams::PackageWithAllocationConfig] - required :package_with_allocation_config, -> { Orb::PriceCreateParams::PackageWithAllocationConfig } + variant :scalable_matrix_with_unit_pricing, -> { Orb::NewFloatingScalableMatrixWithUnitPricingPrice } - # @!attribute unit_with_percent_config - # Configuration for unit_with_percent pricing - # - # @return [Orb::Models::PriceCreateParams::UnitWithPercentConfig] - required :unit_with_percent_config, -> { Orb::PriceCreateParams::UnitWithPercentConfig } + variant :scalable_matrix_with_tiered_pricing, -> { Orb::NewFloatingScalableMatrixWithTieredPricingPrice } - # @!attribute matrix_with_allocation_config - # Configuration for matrix_with_allocation pricing - # - # @return [Orb::Models::MatrixWithAllocationConfig] - required :matrix_with_allocation_config, -> { Orb::MatrixWithAllocationConfig } + variant :cumulative_grouped_bulk, -> { Orb::NewFloatingCumulativeGroupedBulkPrice } - # @!attribute tiered_with_proration_config - # Configuration for tiered_with_proration pricing - # - # @return [Orb::Models::PriceCreateParams::TieredWithProrationConfig] - required :tiered_with_proration_config, -> { Orb::PriceCreateParams::TieredWithProrationConfig } + variant :cumulative_grouped_allocation, -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation } - # @!attribute unit_with_proration_config - # Configuration for unit_with_proration pricing - # - # @return [Orb::Models::PriceCreateParams::UnitWithProrationConfig] - required :unit_with_proration_config, -> { Orb::PriceCreateParams::UnitWithProrationConfig } + variant :minimum_composite, -> { Orb::NewFloatingMinimumCompositePrice } - # @!attribute grouped_allocation_config - # Configuration for grouped_allocation pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedAllocationConfig] - required :grouped_allocation_config, -> { Orb::PriceCreateParams::GroupedAllocationConfig } + variant :percent, -> { Orb::PriceCreateParams::Body::Percent } - # @!attribute bulk_with_proration_config - # Configuration for bulk_with_proration pricing - # - # @return [Orb::Models::PriceCreateParams::BulkWithProrationConfig] - required :bulk_with_proration_config, -> { Orb::PriceCreateParams::BulkWithProrationConfig } + variant :event_output, -> { Orb::PriceCreateParams::Body::EventOutput } - # @!attribute grouped_with_prorated_minimum_config - # Configuration for grouped_with_prorated_minimum pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig] - required :grouped_with_prorated_minimum_config, - -> { Orb::PriceCreateParams::GroupedWithProratedMinimumConfig } + class BulkWithFilters < Orb::Internal::Type::BaseModel + # @!attribute bulk_with_filters_config + # Configuration for bulk_with_filters pricing + # + # @return [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig] + required :bulk_with_filters_config, + -> { Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig } - # @!attribute grouped_with_metered_minimum_config - # Configuration for grouped_with_metered_minimum pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig] - required :grouped_with_metered_minimum_config, - -> { Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig } + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::BulkWithFilters::Cadence } - # @!attribute grouped_with_min_max_thresholds_config - # Configuration for grouped_with_min_max_thresholds pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig] - required :grouped_with_min_max_thresholds_config, - -> { Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig } + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. + # + # @return [String] + required :currency, String - # @!attribute matrix_with_display_name_config - # Configuration for matrix_with_display_name pricing - # - # @return [Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig] - required :matrix_with_display_name_config, -> { Orb::PriceCreateParams::MatrixWithDisplayNameConfig } + # @!attribute item_id + # The id of the item the price will be associated with. + # + # @return [String] + required :item_id, String - # @!attribute grouped_tiered_package_config - # Configuration for grouped_tiered_package pricing - # - # @return [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig] - required :grouped_tiered_package_config, -> { Orb::PriceCreateParams::GroupedTieredPackageConfig } + # @!attribute model_type + # The pricing model type + # + # @return [Symbol, :bulk_with_filters] + required :model_type, const: :bulk_with_filters - # @!attribute max_group_tiered_package_config - # Configuration for max_group_tiered_package pricing - # - # @return [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig] - required :max_group_tiered_package_config, -> { Orb::PriceCreateParams::MaxGroupTieredPackageConfig } + # @!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::PriceCreateParams::ScalableMatrixWithUnitPricingConfig] - required :scalable_matrix_with_unit_pricing_config, - -> { Orb::PriceCreateParams::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 scalable_matrix_with_tiered_pricing_config - # Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @return [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig] - required :scalable_matrix_with_tiered_pricing_config, - -> { Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig } + # @!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 cumulative_grouped_bulk_config - # Configuration for cumulative_grouped_bulk pricing - # - # @return [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig] - required :cumulative_grouped_bulk_config, -> { Orb::PriceCreateParams::CumulativeGroupedBulkConfig } + # @!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 cumulative_grouped_allocation_config - # Configuration for cumulative_grouped_allocation pricing - # - # @return [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig] - required :cumulative_grouped_allocation_config, - -> { Orb::PriceCreateParams::CumulativeGroupedAllocationConfig } + # @!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 minimum_composite_config - # Configuration for minimum_composite pricing - # - # @return [Orb::Models::PriceCreateParams::MinimumCompositeConfig] - required :minimum_composite_config, -> { Orb::PriceCreateParams::MinimumCompositeConfig } + # @!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::BulkWithFilters::ConversionRateConfig }, + nil?: true - # @!attribute percent_config - # Configuration for percent pricing - # - # @return [Orb::Models::PriceCreateParams::PercentConfig] - required :percent_config, -> { Orb::PriceCreateParams::PercentConfig } + # @!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 event_output_config - # Configuration for event_output pricing - # - # @return [Orb::Models::PriceCreateParams::EventOutputConfig] - required :event_output_config, -> { Orb::PriceCreateParams::EventOutputConfig } + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true - # @!method initialize(cadence:, currency:, item_id:, model_type:, name:, unit_config:, tiered_config:, bulk_config:, bulk_with_filters_config:, package_config:, matrix_config:, threshold_total_amount_config:, tiered_package_config:, tiered_with_minimum_config:, grouped_tiered_config:, tiered_package_with_minimum_config:, package_with_allocation_config:, unit_with_percent_config:, matrix_with_allocation_config:, tiered_with_proration_config:, unit_with_proration_config:, grouped_allocation_config:, bulk_with_proration_config:, grouped_with_prorated_minimum_config:, grouped_with_metered_minimum_config:, grouped_with_min_max_thresholds_config:, matrix_with_display_name_config:, grouped_tiered_package_config:, max_group_tiered_package_config:, scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, cumulative_grouped_allocation_config:, minimum_composite_config:, percent_config:, event_output_config:, 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, request_options: {}) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams} for more details. - # - # @param cadence [Symbol, Orb::Models::PriceCreateParams::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 model_type [Symbol, Orb::Models::PriceCreateParams::ModelType] The pricing model type - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param threshold_total_amount_config [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param tiered_package_config [Orb::Models::PriceCreateParams::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param tiered_with_minimum_config [Orb::Models::PriceCreateParams::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param grouped_tiered_config [Orb::Models::PriceCreateParams::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param tiered_package_with_minimum_config [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param package_with_allocation_config [Orb::Models::PriceCreateParams::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param unit_with_percent_config [Orb::Models::PriceCreateParams::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param tiered_with_proration_config [Orb::Models::PriceCreateParams::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param unit_with_proration_config [Orb::Models::PriceCreateParams::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param grouped_allocation_config [Orb::Models::PriceCreateParams::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param bulk_with_proration_config [Orb::Models::PriceCreateParams::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param grouped_with_prorated_minimum_config [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param grouped_with_metered_minimum_config [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing - # - # @param matrix_with_display_name_config [Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param grouped_tiered_package_config [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param max_group_tiered_package_config [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param cumulative_grouped_bulk_config [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param minimum_composite_config [Orb::Models::PriceCreateParams::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param percent_config [Orb::Models::PriceCreateParams::PercentConfig] Configuration for percent pricing - # - # @param event_output_config [Orb::Models::PriceCreateParams::EventOutputConfig] Configuration for event_output 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 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 request_options [Orb::RequestOptions, Hash{Symbol=>Object}] + # @!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 - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true - ANNUAL = :annual - SEMI_ANNUAL = :semi_annual - MONTHLY = :monthly - QUARTERLY = :quarterly - ONE_TIME = :one_time - CUSTOM = :custom + # @!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 - # @!method self.values - # @return [Array] - end + # @!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 - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum + # @!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 - EVENT_OUTPUT = :event_output + # @!method initialize(bulk_with_filters_config:, cadence:, currency:, 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: :bulk_with_filters) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::BulkWithFilters} for more details. + # + # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::BulkWithFilters::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 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, :bulk_with_filters] The pricing model type - # @!method self.values - # @return [Array] - end + # @see Orb::Models::PriceCreateParams::Body::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::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter] } + + # @!attribute tiers + # Bulk tiers for rating based on total usage volume + # + # @return [Array] + required :tiers, + -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::Body::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 - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - # @!attribute filters - # Property filters to apply (all must match) - # - # @return [Array] - required :filters, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter] } - - # @!attribute tiers - # Bulk tiers for rating based on total usage volume - # - # @return [Array] - required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::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 + # @!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. # - # @return [String] - required :property_key, String + # @see Orb::Models::PriceCreateParams::Body::BulkWithFilters#cadence + module Cadence + extend Orb::Internal::Type::Enum - # @!attribute property_value - # Event property value to match + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom + + # @!method self.values + # @return [Array] + end + end + + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. # - # @return [String] - required :property_value, String + # @return [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence } - # @!method initialize(property_key:, property_value:) - # Configuration for a single property filter + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. # - # @param property_key [String] Event property key to filter on + # @return [String] + required :currency, String + + # @!attribute grouped_with_min_max_thresholds_config + # Configuration for grouped_with_min_max_thresholds pricing # - # @param property_value [String] Event property value to match - end + # @return [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] + required :grouped_with_min_max_thresholds_config, + -> { Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig } - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Amount per unit + # @!attribute item_id + # The id of the item the price will be associated with. # # @return [String] - required :unit_amount, String + required :item_id, String - # @!attribute tier_lower_bound - # The lower bound for this tier + # @!attribute model_type + # The pricing model type # - # @return [String, nil] - optional :tier_lower_bound, String, nil?: true + # @return [Symbol, :grouped_with_min_max_thresholds] + required :model_type, const: :grouped_with_min_max_thresholds - # @!method initialize(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier + # @!attribute name + # The name of the price. # - # @param unit_amount [String] Amount per unit + # @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. # - # @param tier_lower_bound [String, nil] The lower bound for this tier - end - end + # @return [String, nil] + optional :billable_metric_id, String, nil?: true - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable] } - - # @!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::PriceCreateParams::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 + # @!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 [String] - required :threshold, String + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - # @!attribute total_amount - # Total amount for this threshold + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. # - # @return [String] - required :total_amount, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!method initialize(threshold:, total_amount:) - # Configuration for a single threshold + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. # - # @param threshold [String] + # @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. # - # @param total_amount [String] Total amount for this threshold - end - end + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::ConversionRateConfig + }, + nil?: true - 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::PriceCreateParams::TieredPackageConfig::Tier] } - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values # - # @return [String] - required :per_unit, String + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true - # @!attribute tier_lower_bound + # @!attribute external_price_id + # An alias for the price. # - # @return [String] - required :tier_lower_bound, String + # @return [String, nil] + optional :external_price_id, String, nil?: true - # @!method initialize(per_unit:, tier_lower_bound:) - # Configuration for a single tier with business logic + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. # - # @param per_unit [String] Price per package + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice # - # @param tier_lower_bound [String] - end - end + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true - 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::PriceCreateParams::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::PriceCreateParams::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 + # @!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 [String] - required :minimum_amount, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!attribute tier_lower_bound + # @!attribute license_type_id + # The ID of the license type to associate with this price. # - # @return [String] - required :tier_lower_bound, String + # @return [String, nil] + optional :license_type_id, String, nil?: true - # @!attribute unit_amount - # Per unit amount + # @!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 [String] - required :unit_amount, String + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(minimum_amount:, tier_lower_bound:, unit_amount:) - # Configuration for a single tier + # @!method initialize(cadence:, currency:, 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, 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: :grouped_with_min_max_thresholds) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds} for more + # details. # - # @param minimum_amount [String] + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence] The cadence to bill for this price on. # - # @param tier_lower_bound [String] + # @param currency [String] An ISO 4217 currency string for which this price is billed in. # - # @param unit_amount [String] Per unit amount - end - end - - 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::PriceCreateParams::GroupedTieredConfig::Tier] } - - # @!method initialize(grouping_key:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing # - # @return [String] - required :tier_lower_bound, String - - # @!attribute unit_amount - # Per unit amount + # @param item_id [String] The id of the item the price will be associated with. # - # @return [String] - required :unit_amount, String - - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier + # @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 tier_lower_bound [String] + # @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 unit_amount [String] Per unit amount + # @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, :grouped_with_min_max_thresholds] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::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::PriceCreateParams::Body::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 - end - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] } - - # @!method initialize(package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. # - # @return [String] - required :minimum_amount, String + # @return [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence } + + # @!attribute cumulative_grouped_allocation_config + # Configuration for cumulative_grouped_allocation pricing + # + # @return [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] + required :cumulative_grouped_allocation_config, + -> { Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig } - # @!attribute per_unit + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. # # @return [String] - required :per_unit, String + required :currency, String - # @!attribute tier_lower_bound + # @!attribute item_id + # The id of the item the price will be associated with. # # @return [String] - required :tier_lower_bound, String + required :item_id, String - # @!method initialize(minimum_amount:, per_unit:, tier_lower_bound:) - # Configuration for a single tier + # @!attribute model_type + # The pricing model type # - # @param minimum_amount [String] - # @param per_unit [String] - # @param tier_lower_bound [String] - end - end + # @return [Symbol, :cumulative_grouped_allocation] + required :model_type, const: :cumulative_grouped_allocation - 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 + # @!attribute name + # The name of the price. + # + # @return [String] + required :name, String - 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 + # @!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 - 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::PriceCreateParams::TieredWithProrationConfig::Tier] } - - # @!method initialize(tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + # @!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 [String] - required :tier_lower_bound, String + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - # @!attribute unit_amount - # Amount per unit + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. # - # @return [String] - required :unit_amount, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tiered with proration tier + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. # - # @param tier_lower_bound [String] Inclusive tier starting value + # @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. # - # @param unit_amount [String] Amount per unit - end - end + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::ConversionRateConfig + }, + nil?: true - 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 + # @!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 - 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 + # @!attribute external_price_id + # An alias for the price. + # + # @return [String, nil] + optional :external_price_id, String, nil?: true - 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::PriceCreateParams::BulkWithProrationConfig::Tier] } + # @!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 - # @!method initialize(tiers:) - # Configuration for bulk_with_proration pricing - # - # @param tiers [Array] Bulk tiers for rating based on total usage volume + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice + # + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true - class Tier < Orb::Internal::Type::BaseModel - # @!attribute unit_amount - # Cost per unit + # @!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 [String] - required :unit_amount, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!attribute tier_lower_bound - # The lower bound for this tier + # @!attribute license_type_id + # The ID of the license type to associate with this price. # # @return [String, nil] - optional :tier_lower_bound, String, nil?: true + 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(unit_amount:, tier_lower_bound: nil) - # Configuration for a single bulk pricing tier with proration + # @!method initialize(cadence:, cumulative_grouped_allocation_config:, currency:, 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: :cumulative_grouped_allocation) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation} for more + # details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence] The cadence to bill for this price on. + # + # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing + # + # @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 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 unit_amount [String] Cost per unit + # @param external_price_id [String, nil] An alias for the price. # - # @param tier_lower_bound [String, nil] The lower bound for this tier + # @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, :cumulative_grouped_allocation] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::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::PriceCreateParams::Body::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 - end - 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 Percent < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. + # + # @return [Symbol, Orb::Models::PriceCreateParams::Body::Percent::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::Percent::Cadence } - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor] } - - # @!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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount] } - - # @!method initialize(grouping_key:, minimum_unit_amount:, pricing_key:, scaling_factors:, scaling_key:, unit_amounts:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. # # @return [String] - required :scaling_factor, String + required :currency, String - # @!attribute scaling_value + # @!attribute item_id + # The id of the item the price will be associated with. # # @return [String] - required :scaling_value, String + required :item_id, String - # @!method initialize(scaling_factor:, scaling_value:) - # Configuration for a scaling factor + # @!attribute model_type + # The pricing model type # - # @param scaling_factor [String] - # @param scaling_value [String] - end + # @return [Symbol, :percent] + required :model_type, const: :percent - class UnitAmount < Orb::Internal::Type::BaseModel - # @!attribute pricing_value + # @!attribute name + # The name of the price. # # @return [String] - required :pricing_value, String + required :name, String - # @!attribute unit_amount - # Per unit amount + # @!attribute percent_config + # Configuration for percent pricing # - # @return [String] - required :unit_amount, String + # @return [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig] + required :percent_config, -> { Orb::PriceCreateParams::Body::Percent::PercentConfig } - # @!method initialize(pricing_value:, unit_amount:) - # Configuration for a unit amount + # @!attribute billable_metric_id + # The id of the billable metric for the price. Only needed if the price is + # usage-based. # - # @param pricing_value [String] + # @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. # - # @param unit_amount [String] Per unit amount - end - end + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - 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 + # @!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 - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] } - - # @!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 + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. # - # @return [String] - required :dimension_value, String + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true - # @!attribute display_name - # Display name for this dimension value + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. # - # @return [String] - required :display_name, String + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::Percent::ConversionRateConfig }, + nil?: true - # @!attribute unit_amount - # Per unit amount + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values # - # @return [String] - required :unit_amount, String + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true - # @!method initialize(dimension_value:, display_name:, unit_amount:) - # Configuration for a unit amount item + # @!attribute external_price_id + # An alias for the price. # - # @param dimension_value [String] The dimension value + # @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. # - # @param display_name [String] Display name for this dimension value + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true + + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice # - # @param unit_amount [String] Per unit amount - end - end + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier] } - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + # @!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 [String] - required :per_unit, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!attribute tier_lower_bound + # @!attribute license_type_id + # The ID of the license type to associate with this price. # - # @return [String] - required :tier_lower_bound, String + # @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(per_unit:, tier_lower_bound:) - # Configuration for a single tier + # @!method initialize(cadence:, currency:, item_id:, name:, percent_config:, 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: :percent) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::Percent} for more details. + # + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::Percent::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 name [String] The name of the price. + # + # @param percent_config [Orb::Models::PriceCreateParams::Body::Percent::PercentConfig] Configuration for percent pricing # - # @param per_unit [String] Per package + # @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b # - # @param tier_lower_bound [String] + # @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, :percent] The pricing model type + + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::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::PriceCreateParams::Body::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 - end - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] } - - # @!method initialize(grouping_key:, package_size:, tiers:) - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams::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 + class EventOutput < Orb::Internal::Type::BaseModel + # @!attribute cadence + # The cadence to bill for this price on. # - # @return [String] - required :tier_lower_bound, String + # @return [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence] + required :cadence, enum: -> { Orb::PriceCreateParams::Body::EventOutput::Cadence } - # @!attribute unit_amount - # Per unit amount + # @!attribute currency + # An ISO 4217 currency string for which this price is billed in. # # @return [String] - required :unit_amount, String + required :currency, String - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier - # - # @param tier_lower_bound [String] + # @!attribute event_output_config + # Configuration for event_output pricing # - # @param unit_amount [String] Per unit amount - end - end + # @return [Orb::Models::PriceCreateParams::Body::EventOutput::EventOutputConfig] + required :event_output_config, -> { Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig } - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] } - - # @!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 + # @!attribute item_id + # The id of the item the price will be associated with. # # @return [String] - required :first_dimension_value, String + required :item_id, String - # @!attribute scaling_factor + # @!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 :scaling_factor, String + required :name, String - # @!attribute second_dimension_value + # @!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 :second_dimension_value, String, nil?: true + optional :billable_metric_id, String, nil?: true - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor + # @!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. # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end - end + # @return [Boolean, nil] + optional :billed_in_advance, Orb::Internal::Type::Boolean, nil?: true - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] } - - # @!attribute tiers - # - # @return [Array] - required :tiers, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier] } - - # @!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 + # @!attribute billing_cycle_configuration + # For custom cadence: specifies the duration of the billing period in days or + # months. # - # @return [String] - required :first_dimension_value, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :billing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!attribute scaling_factor + # @!attribute conversion_rate + # The per unit conversion rate of the price currency to the invoicing currency. # - # @return [String] - required :scaling_factor, String + # @return [Float, nil] + optional :conversion_rate, Float, nil?: true - # @!attribute second_dimension_value + # @!attribute conversion_rate_config + # The configuration for the rate of the price currency to the invoicing currency. # - # @return [String, nil] - optional :second_dimension_value, String, nil?: true + # @return [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] + optional :conversion_rate_config, + union: -> { Orb::PriceCreateParams::Body::EventOutput::ConversionRateConfig }, + nil?: true - # @!method initialize(first_dimension_value:, scaling_factor:, second_dimension_value: nil) - # Configuration for a single matrix scaling factor + # @!attribute dimensional_price_configuration + # For dimensional price: specifies a price group and dimension values # - # @param first_dimension_value [String] - # @param scaling_factor [String] - # @param second_dimension_value [String, nil] - end + # @return [Orb::Models::NewDimensionalPriceConfiguration, nil] + optional :dimensional_price_configuration, -> { Orb::NewDimensionalPriceConfiguration }, nil?: true - class Tier < Orb::Internal::Type::BaseModel - # @!attribute tier_lower_bound + # @!attribute external_price_id + # An alias for the price. # - # @return [String] - required :tier_lower_bound, String + # @return [String, nil] + optional :external_price_id, String, nil?: true - # @!attribute unit_amount + # @!attribute fixed_price_quantity + # If the Price represents a fixed cost, this represents the quantity of units + # applied. # - # @return [String] - required :unit_amount, String + # @return [Float, nil] + optional :fixed_price_quantity, Float, nil?: true - # @!method initialize(tier_lower_bound:, unit_amount:) - # Configuration for a single tier entry with business logic + # @!attribute invoice_grouping_key + # The property used to group this price on an invoice # - # @param tier_lower_bound [String] - # @param unit_amount [String] - end - end + # @return [String, nil] + optional :invoice_grouping_key, String, nil?: true - 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, - -> { Orb::Internal::Type::ArrayOf[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue] } - - # @!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 + # @!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 [String] - required :grouping_key, String + # @return [Orb::Models::NewBillingCycleConfiguration, nil] + optional :invoicing_cycle_configuration, -> { Orb::NewBillingCycleConfiguration }, nil?: true - # @!attribute tier_lower_bound - # Tier lower bound + # @!attribute license_type_id + # The ID of the license type to associate with this price. # - # @return [String] - required :tier_lower_bound, String + # @return [String, nil] + optional :license_type_id, String, nil?: true - # @!attribute unit_amount - # Unit amount for this combination + # @!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 [String] - required :unit_amount, String + # @return [Hash{Symbol=>String, nil}, nil] + optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(grouping_key:, tier_lower_bound:, unit_amount:) - # Configuration for a dimension value entry + # @!method initialize(cadence:, currency:, 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, 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: :event_output) + # Some parameter documentations has been truncated, see + # {Orb::Models::PriceCreateParams::Body::EventOutput} for more details. # - # @param grouping_key [String] Grouping key value + # @param cadence [Symbol, Orb::Models::PriceCreateParams::Body::EventOutput::Cadence] The cadence to bill for this price on. # - # @param tier_lower_bound [String] Tier lower bound + # @param currency [String] An ISO 4217 currency string for which this price is billed in. # - # @param unit_amount [String] Unit amount for this combination - end - end + # @param event_output_config [Orb::Models::PriceCreateParams::Body::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 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, :event_output] The pricing model type - 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 + # The cadence to bill for this price on. + # + # @see Orb::Models::PriceCreateParams::Body::EventOutput#cadence + module Cadence + extend Orb::Internal::Type::Enum - 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 + ANNUAL = :annual + SEMI_ANNUAL = :semi_annual + MONTHLY = :monthly + QUARTERLY = :quarterly + ONE_TIME = :one_time + CUSTOM = :custom - 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 + # @!method self.values + # @return [Array] + end + + # @see Orb::Models::PriceCreateParams::Body::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::PriceCreateParams::Body::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 - 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::PriceCreateParams::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 + # @!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)] end end end diff --git a/lib/orb/models/price_evaluate_params.rb b/lib/orb/models/price_evaluate_params.rb index 81dc48cb2..a6a522db0 100644 --- a/lib/orb/models/price_evaluate_params.rb +++ b/lib/orb/models/price_evaluate_params.rb @@ -7,6 +7,11 @@ class PriceEvaluateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute price_id + # + # @return [String] + required :price_id, String + # @!attribute timeframe_end # The exclusive upper bound for event timestamps # @@ -56,10 +61,12 @@ class PriceEvaluateParams < Orb::Internal::Type::BaseModel Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], nil?: true - # @!method initialize(timeframe_end:, timeframe_start:, customer_id: nil, external_customer_id: nil, filter: nil, grouping_keys: nil, metric_parameter_overrides: nil, request_options: {}) + # @!method initialize(price_id:, timeframe_end:, timeframe_start:, customer_id: nil, external_customer_id: nil, filter: nil, grouping_keys: nil, metric_parameter_overrides: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PriceEvaluateParams} for more details. # + # @param price_id [String] + # # @param timeframe_end [Time] The exclusive upper bound for event timestamps # # @param timeframe_start [Time] The inclusive lower bound for event timestamps diff --git a/lib/orb/models/price_fetch_params.rb b/lib/orb/models/price_fetch_params.rb index 3e34cda5e..d573d5d8b 100644 --- a/lib/orb/models/price_fetch_params.rb +++ b/lib/orb/models/price_fetch_params.rb @@ -7,7 +7,13 @@ class PriceFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute price_id + # + # @return [String] + required :price_id, String + + # @!method initialize(price_id:, request_options: {}) + # @param price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/price_update_params.rb b/lib/orb/models/price_update_params.rb index a90bee1b4..1db6526cf 100644 --- a/lib/orb/models/price_update_params.rb +++ b/lib/orb/models/price_update_params.rb @@ -7,6 +7,11 @@ class PriceUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute price_id + # + # @return [String] + required :price_id, String + # @!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 @@ -15,10 +20,12 @@ class PriceUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(metadata: nil, request_options: {}) + # @!method initialize(price_id:, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::PriceUpdateParams} for more details. # + # @param price_id [String] + # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/prices/external_price_id_fetch_params.rb b/lib/orb/models/prices/external_price_id_fetch_params.rb index d07a30fae..4cb6f39b7 100644 --- a/lib/orb/models/prices/external_price_id_fetch_params.rb +++ b/lib/orb/models/prices/external_price_id_fetch_params.rb @@ -8,7 +8,13 @@ class ExternalPriceIDFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute external_price_id + # + # @return [String] + required :external_price_id, String + + # @!method initialize(external_price_id:, request_options: {}) + # @param external_price_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/prices/external_price_id_update_params.rb b/lib/orb/models/prices/external_price_id_update_params.rb index 5e417ee1f..5e017912d 100644 --- a/lib/orb/models/prices/external_price_id_update_params.rb +++ b/lib/orb/models/prices/external_price_id_update_params.rb @@ -8,6 +8,11 @@ class ExternalPriceIDUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute external_price_id + # + # @return [String] + required :external_price_id, String + # @!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 @@ -16,10 +21,12 @@ class ExternalPriceIDUpdateParams < Orb::Internal::Type::BaseModel # @return [Hash{Symbol=>String, nil}, nil] optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true - # @!method initialize(metadata: nil, request_options: {}) + # @!method initialize(external_price_id:, metadata: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::Prices::ExternalPriceIDUpdateParams} for more details. # + # @param external_price_id [String] + # # @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/subscription_cancel_params.rb b/lib/orb/models/subscription_cancel_params.rb index f77422606..771d527f5 100644 --- a/lib/orb/models/subscription_cancel_params.rb +++ b/lib/orb/models/subscription_cancel_params.rb @@ -7,6 +7,11 @@ class SubscriptionCancelParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute cancel_option # Determines the timing of subscription cancellation # @@ -28,10 +33,12 @@ class SubscriptionCancelParams < Orb::Internal::Type::BaseModel # @return [Time, nil] optional :cancellation_date, Time, nil?: true - # @!method initialize(cancel_option:, allow_invoice_credit_or_void: nil, cancellation_date: nil, request_options: {}) + # @!method initialize(subscription_id:, cancel_option:, allow_invoice_credit_or_void: nil, cancellation_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionCancelParams} for more details. # + # @param subscription_id [String] + # # @param cancel_option [Symbol, Orb::Models::SubscriptionCancelParams::CancelOption] Determines the timing of subscription cancellation # # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a diff --git a/lib/orb/models/subscription_change_apply_params.rb b/lib/orb/models/subscription_change_apply_params.rb index 3e7412e77..fc877bf41 100644 --- a/lib/orb/models/subscription_change_apply_params.rb +++ b/lib/orb/models/subscription_change_apply_params.rb @@ -7,6 +7,11 @@ class SubscriptionChangeApplyParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_change_id + # + # @return [String] + required :subscription_change_id, String + # @!attribute description # Description to apply to the balance transaction representing this credit. # @@ -47,10 +52,12 @@ class SubscriptionChangeApplyParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :previously_collected_amount, String, nil?: true - # @!method initialize(description: nil, mark_as_paid: nil, payment_external_id: nil, payment_notes: nil, payment_received_date: nil, previously_collected_amount: nil, request_options: {}) + # @!method initialize(subscription_change_id:, description: nil, mark_as_paid: nil, payment_external_id: nil, payment_notes: nil, payment_received_date: nil, previously_collected_amount: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionChangeApplyParams} for more details. # + # @param subscription_change_id [String] + # # @param description [String, nil] Description to apply to the balance transaction representing this credit. # # @param mark_as_paid [Boolean, nil] Mark all pending invoices that are payable as paid. If amount is also provided, diff --git a/lib/orb/models/subscription_change_cancel_params.rb b/lib/orb/models/subscription_change_cancel_params.rb index 663660e0c..c46f8274b 100644 --- a/lib/orb/models/subscription_change_cancel_params.rb +++ b/lib/orb/models/subscription_change_cancel_params.rb @@ -7,7 +7,13 @@ class SubscriptionChangeCancelParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute subscription_change_id + # + # @return [String] + required :subscription_change_id, String + + # @!method initialize(subscription_change_id:, request_options: {}) + # @param subscription_change_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/subscription_change_retrieve_params.rb b/lib/orb/models/subscription_change_retrieve_params.rb index 983fb496a..22770090d 100644 --- a/lib/orb/models/subscription_change_retrieve_params.rb +++ b/lib/orb/models/subscription_change_retrieve_params.rb @@ -7,7 +7,13 @@ class SubscriptionChangeRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute subscription_change_id + # + # @return [String] + required :subscription_change_id, String + + # @!method initialize(subscription_change_id:, request_options: {}) + # @param subscription_change_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/subscription_fetch_costs_params.rb b/lib/orb/models/subscription_fetch_costs_params.rb index 7fa0cb63e..f46ad68b2 100644 --- a/lib/orb/models/subscription_fetch_costs_params.rb +++ b/lib/orb/models/subscription_fetch_costs_params.rb @@ -7,6 +7,11 @@ class SubscriptionFetchCostsParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute currency # The currency or custom pricing unit to use. # @@ -34,10 +39,12 @@ class SubscriptionFetchCostsParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::SubscriptionFetchCostsParams::ViewMode, nil] optional :view_mode, enum: -> { Orb::SubscriptionFetchCostsParams::ViewMode }, nil?: true - # @!method initialize(currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) + # @!method initialize(subscription_id:, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionFetchCostsParams} for more details. # + # @param subscription_id [String] + # # @param currency [String, nil] The currency or custom pricing unit to use. # # @param timeframe_end [Time, nil] Costs returned are exclusive of `timeframe_end`. diff --git a/lib/orb/models/subscription_fetch_params.rb b/lib/orb/models/subscription_fetch_params.rb index 060f48029..bd658dd79 100644 --- a/lib/orb/models/subscription_fetch_params.rb +++ b/lib/orb/models/subscription_fetch_params.rb @@ -7,7 +7,13 @@ class SubscriptionFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + + # @!method initialize(subscription_id:, request_options: {}) + # @param subscription_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/subscription_fetch_schedule_params.rb b/lib/orb/models/subscription_fetch_schedule_params.rb index d27278534..7cebb92ac 100644 --- a/lib/orb/models/subscription_fetch_schedule_params.rb +++ b/lib/orb/models/subscription_fetch_schedule_params.rb @@ -7,6 +7,11 @@ class SubscriptionFetchScheduleParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -40,10 +45,12 @@ class SubscriptionFetchScheduleParams < Orb::Internal::Type::BaseModel # @return [Time, nil] optional :start_date_lte, Time, nil?: true - # @!method initialize(cursor: nil, limit: nil, start_date_gt: nil, start_date_gte: nil, start_date_lt: nil, start_date_lte: nil, request_options: {}) + # @!method initialize(subscription_id:, cursor: nil, limit: nil, start_date_gt: nil, start_date_gte: nil, start_date_lt: nil, start_date_lte: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionFetchScheduleParams} for more details. # + # @param subscription_id [String] + # # @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned # # @param limit [Integer] The number of items to fetch. Defaults to 20. diff --git a/lib/orb/models/subscription_fetch_usage_params.rb b/lib/orb/models/subscription_fetch_usage_params.rb index d44d41d65..021b73c54 100644 --- a/lib/orb/models/subscription_fetch_usage_params.rb +++ b/lib/orb/models/subscription_fetch_usage_params.rb @@ -7,6 +7,11 @@ class SubscriptionFetchUsageParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute billable_metric_id # When specified in conjunction with `group_by`, this parameter filters usage to a # single billable metric. Note that both `group_by` and `billable_metric_id` must @@ -68,10 +73,12 @@ class SubscriptionFetchUsageParams < Orb::Internal::Type::BaseModel # @return [Symbol, Orb::Models::SubscriptionFetchUsageParams::ViewMode, nil] optional :view_mode, enum: -> { Orb::SubscriptionFetchUsageParams::ViewMode }, nil?: true - # @!method initialize(billable_metric_id: nil, first_dimension_key: nil, first_dimension_value: nil, granularity: nil, group_by: nil, second_dimension_key: nil, second_dimension_value: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) + # @!method initialize(subscription_id:, billable_metric_id: nil, first_dimension_key: nil, first_dimension_value: nil, granularity: nil, group_by: nil, second_dimension_key: nil, second_dimension_value: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionFetchUsageParams} for more details. # + # @param subscription_id [String] + # # @param billable_metric_id [String, nil] When specified in conjunction with `group_by`, this parameter filters usage to a # # @param first_dimension_key [String, nil] diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 55717ebbe..5368b82f2 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -7,6 +7,11 @@ class SubscriptionPriceIntervalsParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute add # A list of price intervals to add to the subscription. # @@ -48,10 +53,12 @@ class SubscriptionPriceIntervalsParams < Orb::Internal::Type::BaseModel optional :edit_adjustments, -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionPriceIntervalsParams::EditAdjustment] } - # @!method initialize(add: nil, add_adjustments: nil, allow_invoice_credit_or_void: nil, can_defer_billing: nil, edit: nil, edit_adjustments: nil, request_options: {}) + # @!method initialize(subscription_id:, add: nil, add_adjustments: nil, allow_invoice_credit_or_void: nil, can_defer_billing: nil, edit: nil, edit_adjustments: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionPriceIntervalsParams} for more details. # + # @param subscription_id [String] + # # @param add [Array] A list of price intervals to add to the subscription. # # @param add_adjustments [Array] A list of adjustments to add to the subscription. diff --git a/lib/orb/models/subscription_redeem_coupon_params.rb b/lib/orb/models/subscription_redeem_coupon_params.rb index f5d3db68f..1eb121eb7 100644 --- a/lib/orb/models/subscription_redeem_coupon_params.rb +++ b/lib/orb/models/subscription_redeem_coupon_params.rb @@ -7,6 +7,11 @@ class SubscriptionRedeemCouponParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute change_option # # @return [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption] @@ -39,10 +44,12 @@ class SubscriptionRedeemCouponParams < Orb::Internal::Type::BaseModel # @return [String, nil] optional :coupon_redemption_code, String, nil?: true - # @!method initialize(change_option:, allow_invoice_credit_or_void: nil, change_date: nil, coupon_id: nil, coupon_redemption_code: nil, request_options: {}) + # @!method initialize(subscription_id:, change_option:, allow_invoice_credit_or_void: nil, change_date: nil, coupon_id: nil, coupon_redemption_code: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionRedeemCouponParams} for more details. # + # @param subscription_id [String] + # # @param change_option [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption] # # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index c303eeecc..1a7ac6c11 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -7,6 +7,11 @@ class SubscriptionSchedulePlanChangeParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute change_option # # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ChangeOption] @@ -215,10 +220,12 @@ class SubscriptionSchedulePlanChangeParams < Orb::Internal::Type::BaseModel # @return [Array, nil] optional :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true - # @!method initialize(change_option:, add_adjustments: nil, add_prices: nil, align_billing_with_plan_change_date: nil, auto_collection: nil, billing_cycle_alignment: nil, billing_cycle_anchor_configuration: nil, change_date: nil, coupon_redemption_code: nil, credits_overage_rate: nil, default_invoice_memo: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {}) + # @!method initialize(subscription_id:, change_option:, add_adjustments: nil, add_prices: nil, align_billing_with_plan_change_date: nil, auto_collection: nil, billing_cycle_alignment: nil, billing_cycle_anchor_configuration: nil, change_date: nil, coupon_redemption_code: nil, credits_overage_rate: nil, default_invoice_memo: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionSchedulePlanChangeParams} for more details. # + # @param subscription_id [String] + # # @param change_option [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ChangeOption] # # @param add_adjustments [Array, nil] Additional adjustments to be added to the subscription. (Only available for acco diff --git a/lib/orb/models/subscription_trigger_phase_params.rb b/lib/orb/models/subscription_trigger_phase_params.rb index 5a289b712..1147458be 100644 --- a/lib/orb/models/subscription_trigger_phase_params.rb +++ b/lib/orb/models/subscription_trigger_phase_params.rb @@ -7,6 +7,11 @@ class SubscriptionTriggerPhaseParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute allow_invoice_credit_or_void # If false, this request will fail if it would void an issued invoice or create a # credit note. Consider using this as a safety mechanism if you do not expect @@ -22,10 +27,12 @@ class SubscriptionTriggerPhaseParams < Orb::Internal::Type::BaseModel # @return [Date, nil] optional :effective_date, Date, nil?: true - # @!method initialize(allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {}) + # @!method initialize(subscription_id:, allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionTriggerPhaseParams} for more details. # + # @param subscription_id [String] + # # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a # # @param effective_date [Date, nil] The date on which the phase change should take effect. If not provided, defaults diff --git a/lib/orb/models/subscription_unschedule_cancellation_params.rb b/lib/orb/models/subscription_unschedule_cancellation_params.rb index 3e333bf01..068d428aa 100644 --- a/lib/orb/models/subscription_unschedule_cancellation_params.rb +++ b/lib/orb/models/subscription_unschedule_cancellation_params.rb @@ -7,7 +7,13 @@ class SubscriptionUnscheduleCancellationParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + + # @!method initialize(subscription_id:, request_options: {}) + # @param subscription_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb index db41b18d0..a71722520 100644 --- a/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +++ b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb @@ -7,13 +7,20 @@ class SubscriptionUnscheduleFixedFeeQuantityUpdatesParams < Orb::Internal::Type: extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute price_id # Price for which the updates should be cleared. Must be a fixed fee. # # @return [String] required :price_id, String - # @!method initialize(price_id:, request_options: {}) + # @!method initialize(subscription_id:, price_id:, request_options: {}) + # @param subscription_id [String] + # # @param price_id [String] Price for which the updates should be cleared. Must be a fixed fee. # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] diff --git a/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb b/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb index e46889072..ff414f25a 100644 --- a/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +++ b/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb @@ -7,7 +7,13 @@ class SubscriptionUnschedulePendingPlanChangesParams < Orb::Internal::Type::Base extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - # @!method initialize(request_options: {}) + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + + # @!method initialize(subscription_id:, request_options: {}) + # @param subscription_id [String] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb b/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb index 79725847f..0c5745c92 100644 --- a/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +++ b/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb @@ -7,6 +7,11 @@ class SubscriptionUpdateFixedFeeQuantityParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute price_id # Price for which the quantity should be updated. Must be a fixed fee. # @@ -42,10 +47,12 @@ class SubscriptionUpdateFixedFeeQuantityParams < Orb::Internal::Type::BaseModel # @return [Date, nil] optional :effective_date, Date, nil?: true - # @!method initialize(price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {}) + # @!method initialize(subscription_id:, price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionUpdateFixedFeeQuantityParams} for more details. # + # @param subscription_id [String] + # # @param price_id [String] Price for which the quantity should be updated. Must be a fixed fee. # # @param quantity [Float] diff --git a/lib/orb/models/subscription_update_params.rb b/lib/orb/models/subscription_update_params.rb index 707f3615f..abd1bc9db 100644 --- a/lib/orb/models/subscription_update_params.rb +++ b/lib/orb/models/subscription_update_params.rb @@ -7,6 +7,11 @@ class SubscriptionUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute auto_collection # Determines whether issued invoices for this subscription will automatically be # charged with the saved payment method on the due date. This property defaults to @@ -47,10 +52,12 @@ class SubscriptionUpdateParams < Orb::Internal::Type::BaseModel # @return [Integer, nil] optional :net_terms, Integer, nil?: true - # @!method initialize(auto_collection: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {}) + # @!method initialize(subscription_id:, auto_collection: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionUpdateParams} for more details. # + # @param subscription_id [String] + # # @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c # # @param default_invoice_memo [String, nil] Determines the default memo on this subscription's invoices. Note that if this i diff --git a/lib/orb/models/subscription_update_trial_params.rb b/lib/orb/models/subscription_update_trial_params.rb index 2323b9dcd..483d1ad42 100644 --- a/lib/orb/models/subscription_update_trial_params.rb +++ b/lib/orb/models/subscription_update_trial_params.rb @@ -7,6 +7,11 @@ class SubscriptionUpdateTrialParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + # @!attribute subscription_id + # + # @return [String] + required :subscription_id, String + # @!attribute trial_end_date # The new date that the trial should end, or the literal string `immediate` to end # the trial immediately. @@ -21,10 +26,12 @@ class SubscriptionUpdateTrialParams < Orb::Internal::Type::BaseModel # @return [Boolean, nil] optional :shift, Orb::Internal::Type::Boolean - # @!method initialize(trial_end_date:, shift: nil, request_options: {}) + # @!method initialize(subscription_id:, trial_end_date:, shift: nil, request_options: {}) # Some parameter documentations has been truncated, see # {Orb::Models::SubscriptionUpdateTrialParams} for more details. # + # @param subscription_id [String] + # # @param trial_end_date [Time, Symbol, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate] The new date that the trial should end, or the literal string `immediate` to end # # @param shift [Boolean] If true, shifts subsequent price and adjustment intervals (preserving their dura diff --git a/lib/orb/resources/alerts.rb b/lib/orb/resources/alerts.rb index 596c76a4b..f6c47103f 100644 --- a/lib/orb/resources/alerts.rb +++ b/lib/orb/resources/alerts.rb @@ -179,6 +179,9 @@ def create_for_external_customer(external_customer_id, params) ) end + # Some parameter documentations has been truncated, see + # {Orb::Models::AlertCreateForSubscriptionParams} for more details. + # # This endpoint is used to create alerts at the subscription level. # # Subscription level alerts can be one of two types: `usage_exceeded` or @@ -191,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:, metric_id: nil, request_options: {}) + # @overload create_for_subscription(subscription_id, thresholds:, type:, grouping_keys: nil, metric_id: nil, pricing_unit_id: nil, request_options: {}) # # @param subscription_id [String] # @@ -199,8 +202,12 @@ def create_for_external_customer(external_customer_id, params) # # @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type. # + # @param grouping_keys [Array, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale + # # @param metric_id [String, nil] The metric to track usage for. # + # @param pricing_unit_id [String, nil] The pricing unit to use for grouped cost alerts. Required when grouping_keys is + # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Orb::Models::Alert] diff --git a/lib/orb/resources/customers.rb b/lib/orb/resources/customers.rb index e87837069..066cb32c1 100644 --- a/lib/orb/resources/customers.rb +++ b/lib/orb/resources/customers.rb @@ -147,9 +147,10 @@ def create(params) # # This endpoint can be used to update the `payment_provider`, # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, - # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and - # `additional_emails` of an existing customer. Other fields on a customer are - # currently immutable. + # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, + # `additional_emails`, and `currency` of an existing customer. `currency` can only + # be set if it has not already been set on the customer. Other fields on a + # customer are currently immutable. # # @overload update(customer_id, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {}) # @@ -165,7 +166,7 @@ def create(params) # # @param billing_address [Orb::Models::AddressInput, nil] # - # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not + # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c # # @param email [String, nil] A valid customer email, to be used for invoicing and notifications. # @@ -406,7 +407,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(external_customer_ # # @param billing_address [Orb::Models::AddressInput, nil] # - # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not + # @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c # # @param email [String, nil] A valid customer email, to be used for invoicing and notifications. # diff --git a/lib/orb/resources/customers/credits/ledger.rb b/lib/orb/resources/customers/credits/ledger.rb index f755374c4..962719b32 100644 --- a/lib/orb/resources/customers/credits/ledger.rb +++ b/lib/orb/resources/customers/credits/ledger.rb @@ -137,9 +137,6 @@ def list(customer_id, params = {}) ) end - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details. - # # This endpoint allows you to create a new ledger entry for a specified customer's # balance. This can be used to increment balance, deduct credits, and change the # expiry date of existing credits. @@ -190,7 +187,9 @@ def list(customer_id, params = {}) # also generate a one-off invoice for the customer for the credits pre-purchase. # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges # on the invoice are calculated by multiplying the cost basis with the number of - # credit units added. + # credit units added. If you invoice or handle payment of credits outside of Orb + # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + # `true` to prevent duplicate invoicing effects. # # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated # and `invoice_settings` must be included @@ -256,36 +255,10 @@ def list(customer_id, params = {}) # that was originally decremented from, and `amount` indicates how many credits to # return to the customer, up to the block's initial balance. # - # @overload create_entry(customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {}) + # @overload create_entry(customer_id, body:, request_options: {}) # # @param customer_id [String] - # - # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre - # - # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType] - # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot - # - # @param block_id [String] The ID of the block to reverse a decrement from. - # - # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r - # - # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. - # - # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai - # - # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire - # - # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec - # - # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde - # - # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur - # - # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. - # + # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry] @@ -296,16 +269,12 @@ def create_entry(customer_id, params) @client.request( method: :post, path: ["customers/%1$s/credits/ledger_entry", customer_id], - body: parsed, + body: parsed[:body], model: Orb::Models::Customers::Credits::LedgerCreateEntryResponse, options: options ) end - # Some parameter documentations has been truncated, see - # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more - # details. - # # This endpoint allows you to create a new ledger entry for a specified customer's # balance. This can be used to increment balance, deduct credits, and change the # expiry date of existing credits. @@ -356,7 +325,9 @@ def create_entry(customer_id, params) # also generate a one-off invoice for the customer for the credits pre-purchase. # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges # on the invoice are calculated by multiplying the cost basis with the number of - # credit units added. + # credit units added. If you invoice or handle payment of credits outside of Orb + # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + # `true` to prevent duplicate invoicing effects. # # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated # and `invoice_settings` must be included @@ -422,36 +393,10 @@ def create_entry(customer_id, params) # that was originally decremented from, and `amount` indicates how many credits to # return to the customer, up to the block's initial balance. # - # @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, filters: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {}) + # @overload create_entry_by_external_id(external_customer_id, body:, request_options: {}) # # @param external_customer_id [String] - # - # @param amount [Float] The number of credits to effect. Note that this is required for increment, decre - # - # @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType] - # - # @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot - # - # @param block_id [String] The ID of the block to reverse a decrement from. - # - # @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r - # - # @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API. - # - # @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai - # - # @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire - # - # @param filters [Array, nil] Optional filter to specify which items this credit block applies to. If not spec - # - # @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde - # - # @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, nil] Can only be specified when entry_type=increment. How much, in the customer's cur - # - # @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void. - # + # @param body [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment] # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry] @@ -462,7 +407,7 @@ def create_entry_by_external_id(external_customer_id, params) @client.request( method: :post, path: ["customers/external_customer_id/%1$s/credits/ledger_entry", external_customer_id], - body: parsed, + body: parsed[:body], model: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse, options: options ) diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index 32e7c652f..267d239c8 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -26,9 +26,6 @@ class Prices # @return [Orb::Resources::Prices::ExternalPriceID] attr_reader :external_price_id - # Some parameter documentations has been truncated, see - # {Orb::Models::PriceCreateParams} for more details. - # # This endpoint is used to create a [price](/product-catalog/price-configuration). # A price created using this endpoint is always an add-on, meaning that it's not # associated with a specific plan and can instead be individually added to @@ -40,103 +37,9 @@ class Prices # See the [Price resource](/product-catalog/price-configuration) for the # specification of different price model configurations possible in this endpoint. # - # @overload create(cadence:, currency:, item_id:, model_type:, name:, unit_config:, tiered_config:, bulk_config:, bulk_with_filters_config:, package_config:, matrix_config:, threshold_total_amount_config:, tiered_package_config:, tiered_with_minimum_config:, grouped_tiered_config:, tiered_package_with_minimum_config:, package_with_allocation_config:, unit_with_percent_config:, matrix_with_allocation_config:, tiered_with_proration_config:, unit_with_proration_config:, grouped_allocation_config:, bulk_with_proration_config:, grouped_with_prorated_minimum_config:, grouped_with_metered_minimum_config:, grouped_with_min_max_thresholds_config:, matrix_with_display_name_config:, grouped_tiered_package_config:, max_group_tiered_package_config:, scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, cumulative_grouped_allocation_config:, minimum_composite_config:, percent_config:, event_output_config:, 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, request_options: {}) - # - # @param cadence [Symbol, Orb::Models::PriceCreateParams::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 model_type [Symbol, Orb::Models::PriceCreateParams::ModelType] The pricing model type - # - # @param name [String] The name of the price. - # - # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing - # - # @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing - # - # @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing - # - # @param bulk_with_filters_config [Orb::Models::PriceCreateParams::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing - # - # @param package_config [Orb::Models::PackageConfig] Configuration for package pricing - # - # @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing - # - # @param threshold_total_amount_config [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing - # - # @param tiered_package_config [Orb::Models::PriceCreateParams::TieredPackageConfig] Configuration for tiered_package pricing - # - # @param tiered_with_minimum_config [Orb::Models::PriceCreateParams::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing - # - # @param grouped_tiered_config [Orb::Models::PriceCreateParams::GroupedTieredConfig] Configuration for grouped_tiered pricing - # - # @param tiered_package_with_minimum_config [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing - # - # @param package_with_allocation_config [Orb::Models::PriceCreateParams::PackageWithAllocationConfig] Configuration for package_with_allocation pricing - # - # @param unit_with_percent_config [Orb::Models::PriceCreateParams::UnitWithPercentConfig] Configuration for unit_with_percent pricing - # - # @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing - # - # @param tiered_with_proration_config [Orb::Models::PriceCreateParams::TieredWithProrationConfig] Configuration for tiered_with_proration pricing - # - # @param unit_with_proration_config [Orb::Models::PriceCreateParams::UnitWithProrationConfig] Configuration for unit_with_proration pricing - # - # @param grouped_allocation_config [Orb::Models::PriceCreateParams::GroupedAllocationConfig] Configuration for grouped_allocation pricing - # - # @param bulk_with_proration_config [Orb::Models::PriceCreateParams::BulkWithProrationConfig] Configuration for bulk_with_proration pricing - # - # @param grouped_with_prorated_minimum_config [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing - # - # @param grouped_with_metered_minimum_config [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing - # - # @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing + # @overload create(body:, request_options: {}) # - # @param matrix_with_display_name_config [Orb::Models::PriceCreateParams::MatrixWithDisplayNameConfig] Configuration for matrix_with_display_name pricing - # - # @param grouped_tiered_package_config [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing - # - # @param max_group_tiered_package_config [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing - # - # @param scalable_matrix_with_unit_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing - # - # @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing - # - # @param cumulative_grouped_bulk_config [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing - # - # @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing - # - # @param minimum_composite_config [Orb::Models::PriceCreateParams::MinimumCompositeConfig] Configuration for minimum_composite pricing - # - # @param percent_config [Orb::Models::PriceCreateParams::PercentConfig] Configuration for percent pricing - # - # @param event_output_config [Orb::Models::PriceCreateParams::EventOutputConfig] Configuration for event_output 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 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 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 request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -145,7 +48,13 @@ class Prices # @see Orb::Models::PriceCreateParams def create(params) parsed, options = Orb::PriceCreateParams.dump_request(params) - @client.request(method: :post, path: "prices", body: parsed, model: Orb::Price, options: options) + @client.request( + method: :post, + path: "prices", + body: parsed[:body], + model: Orb::Price, + options: options + ) end # Some parameter documentations has been truncated, see diff --git a/lib/orb/version.rb b/lib/orb/version.rb index dbd18c4ba..b43d5ca28 100644 --- a/lib/orb/version.rb +++ b/lib/orb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Orb - VERSION = "1.13.0" + VERSION = "1.14.0" end diff --git a/rbi/orb/client.rbi b/rbi/orb/client.rbi index e3315db19..f43653dd4 100644 --- a/rbi/orb/client.rbi +++ b/rbi/orb/client.rbi @@ -13,6 +13,9 @@ module Orb sig { returns(String) } attr_reader :api_key + sig { returns(T.nilable(String)) } + attr_reader :webhook_secret + sig { returns(Orb::Resources::TopLevel) } attr_reader :top_level @@ -151,6 +154,7 @@ module Orb sig do params( api_key: T.nilable(String), + webhook_secret: T.nilable(String), base_url: T.nilable(String), max_retries: Integer, timeout: Float, @@ -162,6 +166,8 @@ module Orb def self.new( # Defaults to `ENV["ORB_API_KEY"]` api_key: ENV["ORB_API_KEY"], + # Defaults to `ENV["ORB_WEBHOOK_SECRET"]` + webhook_secret: ENV["ORB_WEBHOOK_SECRET"], # Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["ORB_BASE_URL"]` base_url: ENV["ORB_BASE_URL"], diff --git a/rbi/orb/models/alert.rbi b/rbi/orb/models/alert.rbi index a5e0a3a97..185194d1e 100644 --- a/rbi/orb/models/alert.rbi +++ b/rbi/orb/models/alert.rbi @@ -65,6 +65,11 @@ module Orb sig { returns(T.nilable(T::Array[Orb::Alert::BalanceAlertStatus])) } attr_accessor :balance_alert_status + # The property keys to group cost alerts by. Only present for cost alerts with + # grouping enabled. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :grouping_keys + # Minified license type for alert serialization. sig { returns(T.nilable(Orb::Alert::LicenseType)) } attr_reader :license_type @@ -93,6 +98,7 @@ module Orb type: Orb::Alert::Type::OrSymbol, 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) ).returns(T.attached_class) end @@ -121,6 +127,9 @@ module Orb # The current status of the alert. This field is only present for credit balance # alerts. balance_alert_status: nil, + # The property keys to group cost alerts by. Only present for cost alerts with + # grouping enabled. + grouping_keys: nil, # Minified license type for alert serialization. license_type: nil ) @@ -141,6 +150,7 @@ module Orb type: Orb::Alert::Type::TaggedSymbol, balance_alert_status: T.nilable(T::Array[Orb::Alert::BalanceAlertStatus]), + grouping_keys: T.nilable(T::Array[String]), license_type: T.nilable(Orb::Alert::LicenseType) } ) diff --git a/rbi/orb/models/alert_create_for_customer_params.rbi b/rbi/orb/models/alert_create_for_customer_params.rbi index bc40fd5b7..6613b1544 100644 --- a/rbi/orb/models/alert_create_for_customer_params.rbi +++ b/rbi/orb/models/alert_create_for_customer_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::AlertCreateForCustomerParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :customer_id + # The case sensitive currency or custom pricing unit to use for this alert. sig { returns(String) } attr_accessor :currency @@ -25,6 +28,7 @@ module Orb sig do params( + customer_id: String, currency: String, type: Orb::AlertCreateForCustomerParams::Type::OrSymbol, thresholds: T.nilable(T::Array[Orb::Threshold::OrHash]), @@ -32,6 +36,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, # The case sensitive currency or custom pricing unit to use for this alert. currency:, # The type of alert to create. This must be a valid alert type. @@ -45,6 +50,7 @@ module Orb sig do override.returns( { + customer_id: String, currency: String, type: Orb::AlertCreateForCustomerParams::Type::OrSymbol, thresholds: T.nilable(T::Array[Orb::Threshold]), diff --git a/rbi/orb/models/alert_create_for_external_customer_params.rbi b/rbi/orb/models/alert_create_for_external_customer_params.rbi index a733b6a5d..06630746c 100644 --- a/rbi/orb/models/alert_create_for_external_customer_params.rbi +++ b/rbi/orb/models/alert_create_for_external_customer_params.rbi @@ -14,6 +14,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + # The case sensitive currency or custom pricing unit to use for this alert. sig { returns(String) } attr_accessor :currency @@ -28,6 +31,7 @@ module Orb sig do params( + external_customer_id: String, currency: String, type: Orb::AlertCreateForExternalCustomerParams::Type::OrSymbol, thresholds: T.nilable(T::Array[Orb::Threshold::OrHash]), @@ -35,6 +39,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_customer_id:, # The case sensitive currency or custom pricing unit to use for this alert. currency:, # The type of alert to create. This must be a valid alert type. @@ -48,6 +53,7 @@ module Orb sig do override.returns( { + external_customer_id: String, currency: String, type: Orb::AlertCreateForExternalCustomerParams::Type::OrSymbol, thresholds: T.nilable(T::Array[Orb::Threshold]), diff --git a/rbi/orb/models/alert_create_for_subscription_params.rbi b/rbi/orb/models/alert_create_for_subscription_params.rbi index f25ecb91b..3bb64bdda 100644 --- a/rbi/orb/models/alert_create_for_subscription_params.rbi +++ b/rbi/orb/models/alert_create_for_subscription_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::AlertCreateForSubscriptionParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # The thresholds that define the values at which the alert will be triggered. sig { returns(T::Array[Orb::Threshold]) } attr_accessor :thresholds @@ -19,25 +22,45 @@ module Orb sig { returns(Orb::AlertCreateForSubscriptionParams::Type::OrSymbol) } attr_accessor :type + # The property keys to group cost alerts by. Only applicable for cost_exceeded + # alerts. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :grouping_keys + # The metric to track usage for. sig { returns(T.nilable(String)) } attr_accessor :metric_id + # 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 + sig do params( + subscription_id: String, thresholds: T::Array[Orb::Threshold::OrHash], type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, + grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + pricing_unit_id: T.nilable(String), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + subscription_id:, # The thresholds that define the values at which the alert will be triggered. thresholds:, # The type of alert to create. This must be a valid alert type. type:, + # The property keys to group cost alerts by. Only applicable for cost_exceeded + # alerts. + grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # The pricing unit to use for grouped cost alerts. Required when grouping_keys is + # set. + pricing_unit_id: nil, request_options: {} ) end @@ -45,9 +68,12 @@ module Orb sig do override.returns( { + subscription_id: String, thresholds: T::Array[Orb::Threshold], type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, + grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + pricing_unit_id: T.nilable(String), request_options: Orb::RequestOptions } ) diff --git a/rbi/orb/models/alert_disable_params.rbi b/rbi/orb/models/alert_disable_params.rbi index 4567c1c6d..cf285d1a1 100644 --- a/rbi/orb/models/alert_disable_params.rbi +++ b/rbi/orb/models/alert_disable_params.rbi @@ -9,17 +9,22 @@ module Orb OrHash = T.type_alias { T.any(Orb::AlertDisableParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :alert_configuration_id + # Used to update the status of a plan alert scoped to this subscription_id sig { returns(T.nilable(String)) } attr_accessor :subscription_id sig do params( + alert_configuration_id: String, subscription_id: T.nilable(String), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + alert_configuration_id:, # Used to update the status of a plan alert scoped to this subscription_id subscription_id: nil, request_options: {} @@ -29,6 +34,7 @@ module Orb sig do override.returns( { + alert_configuration_id: String, subscription_id: T.nilable(String), request_options: Orb::RequestOptions } diff --git a/rbi/orb/models/alert_enable_params.rbi b/rbi/orb/models/alert_enable_params.rbi index c1ef41431..75b353ad5 100644 --- a/rbi/orb/models/alert_enable_params.rbi +++ b/rbi/orb/models/alert_enable_params.rbi @@ -9,17 +9,22 @@ module Orb OrHash = T.type_alias { T.any(Orb::AlertEnableParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :alert_configuration_id + # Used to update the status of a plan alert scoped to this subscription_id sig { returns(T.nilable(String)) } attr_accessor :subscription_id sig do params( + alert_configuration_id: String, subscription_id: T.nilable(String), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + alert_configuration_id:, # Used to update the status of a plan alert scoped to this subscription_id subscription_id: nil, request_options: {} @@ -29,6 +34,7 @@ module Orb sig do override.returns( { + alert_configuration_id: String, subscription_id: T.nilable(String), request_options: Orb::RequestOptions } diff --git a/rbi/orb/models/alert_retrieve_params.rbi b/rbi/orb/models/alert_retrieve_params.rbi index 7d14fa491..8d81b8d0e 100644 --- a/rbi/orb/models/alert_retrieve_params.rbi +++ b/rbi/orb/models/alert_retrieve_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::AlertRetrieveParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :alert_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + alert_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(alert_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { alert_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/alert_update_params.rbi b/rbi/orb/models/alert_update_params.rbi index a4ceaaaf6..78acb6903 100644 --- a/rbi/orb/models/alert_update_params.rbi +++ b/rbi/orb/models/alert_update_params.rbi @@ -9,17 +9,22 @@ module Orb OrHash = T.type_alias { T.any(Orb::AlertUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :alert_configuration_id + # The thresholds that define the values at which the alert will be triggered. sig { returns(T::Array[Orb::Threshold]) } attr_accessor :thresholds sig do params( + alert_configuration_id: String, thresholds: T::Array[Orb::Threshold::OrHash], request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + alert_configuration_id:, # The thresholds that define the values at which the alert will be triggered. thresholds:, request_options: {} @@ -29,6 +34,7 @@ module Orb sig do override.returns( { + alert_configuration_id: String, thresholds: T::Array[Orb::Threshold], request_options: Orb::RequestOptions } 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 2aef17ff9..91ef379c7 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 @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_plan_id + # New version number. sig { returns(Integer) } attr_accessor :version @@ -97,6 +100,7 @@ module Orb sig do params( + external_plan_id: String, version: Integer, add_adjustments: T.nilable( @@ -139,6 +143,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_plan_id:, # New version number. version:, # Additional adjustments to be added to the plan. @@ -162,6 +167,7 @@ module Orb sig do override.returns( { + external_plan_id: String, version: Integer, add_adjustments: T.nilable( @@ -320,6 +326,48 @@ module Orb end attr_writer :allocation_price + # The license allocation price to add to the plan. + 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 + ) + ) + ) + end + attr_accessor :license_allocation_price + # The phase to add this price to. sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order @@ -369,6 +417,42 @@ module Orb sig do params( 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -411,6 +495,8 @@ module Orb def self.new( # 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 add this price to. plan_phase_order: nil, # New plan price request body params. @@ -422,6 +508,42 @@ module Orb override.returns( { 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -465,76 +587,60 @@ module Orb def to_hash end - # New plan price request body params. - module Price + # The license allocation price to add to the plan. + module LicenseAllocationPrice 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 + 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 ) end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class Unit < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, 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 + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) end attr_accessor :cadence @@ -543,6 +649,18 @@ 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::Unit::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -551,6 +669,13 @@ module Orb 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)) } @@ -651,12 +776,15 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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: @@ -684,14 +812,18 @@ 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 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, @@ -730,20 +862,23 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :unit ) 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, + 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: @@ -773,159 +908,6 @@ module Orb 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 @@ -934,7 +916,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -942,51 +924,102 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ] ) end def self.values end end - end - class TieredWithProration < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + 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 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::AddPrice::Price::TieredWithProration, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered, Orb::Internal::AnyHash ) end @@ -994,7 +1027,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::LicenseAllocationPrice::Tiered::Cadence::OrSymbol ) end attr_accessor :cadence @@ -1003,6 +1036,18 @@ 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::Tiered::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1011,21 +1056,12 @@ 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 + # Configuration for tiered pricing + sig { returns(Orb::TieredConfig) } + attr_reader :tiered_config - sig do - params( - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_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. @@ -1128,11 +1164,14 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash + ], name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, + tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1164,10 +1203,14 @@ 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:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, + # 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, @@ -1206,7 +1249,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :tiered ) end @@ -1214,12 +1257,15 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation + ], model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1257,7 +1303,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1265,38 +1311,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ] ) end @@ -1304,134 +1350,97 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, 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 + # 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 - # Configuration for tiered_with_proration pricing sig do params( - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # 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( { - tiers: - T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) 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 + class Bulk < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # 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( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation + ] ) 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 + attr_accessor :license_allocations # The pricing model type sig { returns(Symbol) } @@ -1541,11 +1550,14 @@ module Orb sig do params( + bulk_config: Orb::BulkConfig::OrHash, 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::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash + ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1574,12 +1586,16 @@ 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:, - # 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 @@ -1620,18 +1636,21 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :bulk ) end sig do override.returns( { + bulk_config: Orb::BulkConfig, 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::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation + ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1671,7 +1690,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1679,38 +1698,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ] ) end @@ -1718,59 +1737,50 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, 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 + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :amount - # The minimum amount to charge each group, regardless of usage + # The currency of the license allocation. sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :currency - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # Configuration for grouped_with_min_max_thresholds pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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: + # 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( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -1779,43 +1789,55 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::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::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # Configuration for cumulative_grouped_allocation pricing sig do - returns( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) + params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - attr_reader :cumulative_grouped_allocation_config + attr_writer :bulk_with_filters_config + # The cadence to bill for this price on. sig do - params( - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol + ) end - attr_writer :cumulative_grouped_allocation_config + 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::BulkWithFilters::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1924,11 +1946,15 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, 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::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, 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), @@ -1957,12 +1983,16 @@ 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 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 @@ -2003,18 +2033,22 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, 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), @@ -2046,6 +2080,159 @@ module Orb def to_hash end + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters 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 + ] + ).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::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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::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 + # The cadence to bill for this price on. module Cadence extend Orb::Internal::Type::Enum @@ -2054,7 +2241,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2062,38 +2249,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ] ) end @@ -2101,59 +2288,50 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, Orb::Internal::AnyHash ) end - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :amount - # The event property used to group usage before applying allocations + # The currency of the license allocation. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :currency - # The amount to charge for each unit outside of the allocation - 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 - # Configuration for cumulative_grouped_allocation pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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: + # 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( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -2162,11 +2340,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class Package < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Internal::AnyHash ) end @@ -2174,7 +2352,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::LicenseAllocationPrice::Package::Cadence::OrSymbol ) end attr_accessor :cadence @@ -2183,6 +2361,18 @@ 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::Package::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2191,21 +2381,12 @@ 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 + # Configuration for package pricing + sig { returns(Orb::PackageConfig) } + attr_reader :package_config - sig do - params( - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_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. @@ -2308,11 +2489,14 @@ module Orb sig do params( cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash + ], name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, + package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2344,10 +2528,14 @@ 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:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, + # 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, @@ -2386,7 +2574,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :package ) end @@ -2394,12 +2582,15 @@ module Orb override.returns( { cadence: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation + ], model_type: Symbol, name: String, - percent_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2437,7 +2628,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2445,38 +2636,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ] ) end @@ -2484,38 +2675,63 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # 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 + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - sig { override.returns({ percent: Float }) } + # 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 EventOutput < Orb::Internal::Type::BaseModel + class Matrix < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Internal::AnyHash ) end @@ -2523,30 +2739,33 @@ 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::LicenseAllocationPrice::Matrix::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # 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( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation + ] ) end - attr_reader :event_output_config + attr_accessor :license_allocations - sig do - params( - event_output_config: - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config + # Configuration for matrix pricing + sig { returns(Orb::MatrixConfig) } + attr_reader :matrix_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } + attr_writer :matrix_config # The pricing model type sig { returns(Symbol) } @@ -2657,10 +2876,13 @@ 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::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash + ], + matrix_config: Orb::MatrixConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -2691,10 +2913,14 @@ 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:, + # 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 @@ -2735,7 +2961,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :matrix ) end @@ -2743,10 +2969,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::LicenseAllocationPrice::Matrix::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, billable_metric_id: T.nilable(String), @@ -2786,7 +3015,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2794,38 +3023,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ] ) end @@ -2833,57 +3062,50 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :unit_rating_key + attr_accessor :amount - # 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 + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # 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 + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # Configuration for event_output pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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 + # 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( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -2892,371 +3114,29423 @@ module Orb 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 + class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + Orb::Internal::AnyHash + ) + end - # The phase to remove this adjustment from. - sig { returns(T.nilable(Integer)) } - attr_accessor :plan_phase_order + # The cadence to bill for this price on. + sig do + returns( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + ) + end + attr_accessor :cadence - 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 + # License allocations to associate with 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::ThresholdTotalAmount::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - 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 + # 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( - 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 + params( + threshold_total_amount_config: + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash + ).void + end + attr_writer :threshold_total_amount_config - 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( + # 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::ThresholdTotalAmount::Cadence::OrSymbol, + 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: + 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::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + 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: + 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::ThresholdTotalAmount::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::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::AddPrice::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::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::Beta::ExternalPlanIDCreatePlanVersionParams::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 + + # 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 + + 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 + + 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 { 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::AddPrice::LicenseAllocationPrice::TieredPackage, + Orb::Internal::AnyHash + ) + end + + # 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 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::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::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + ) + 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 + + # 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::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 + 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 + ) ), - replaces_adjustment_id: String, - plan_phase_order: T.nilable(Integer) + 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 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 + # 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( - { - 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 + 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: + ) + 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::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 + + # 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::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 + + 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) + } + ) + 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::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + 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 + override.returns( + T::Array[ + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum + # 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::ReplaceAdjustment::Adjustment::Variants + Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 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), - 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 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), - 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 # New plan price request body params. module Price diff --git a/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi index 6674a446e..a6b30b355 100644 --- a/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi @@ -18,18 +18,26 @@ module Orb sig { returns(String) } attr_accessor :external_plan_id + sig { returns(String) } + attr_accessor :version + sig do params( external_plan_id: String, + version: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(external_plan_id:, request_options: {}) + def self.new(external_plan_id:, version:, request_options: {}) end sig do override.returns( - { external_plan_id: String, request_options: Orb::RequestOptions } + { + external_plan_id: String, + version: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi b/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi index a5baa9e31..92309153d 100644 --- a/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +++ b/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi @@ -15,17 +15,22 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_plan_id + # Plan version to set as the default. sig { returns(Integer) } attr_accessor :version sig do params( + external_plan_id: String, version: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + external_plan_id:, # Plan version to set as the default. version:, request_options: {} @@ -34,7 +39,11 @@ module Orb sig do override.returns( - { version: Integer, request_options: Orb::RequestOptions } + { + external_plan_id: String, + version: Integer, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/beta_create_plan_version_params.rbi b/rbi/orb/models/beta_create_plan_version_params.rbi index b35064bfc..afb0ad090 100644 --- a/rbi/orb/models/beta_create_plan_version_params.rbi +++ b/rbi/orb/models/beta_create_plan_version_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::BetaCreatePlanVersionParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :plan_id + # New version number. sig { returns(Integer) } attr_accessor :version @@ -71,6 +74,7 @@ module Orb sig do params( + plan_id: String, version: Integer, add_adjustments: T.nilable( @@ -105,6 +109,7 @@ module Orb ).returns(T.attached_class) end def self.new( + plan_id:, # New version number. version:, # Additional adjustments to be added to the plan. @@ -128,6 +133,7 @@ module Orb sig do override.returns( { + plan_id: String, version: Integer, add_adjustments: T.nilable( @@ -272,6 +278,48 @@ module Orb end attr_writer :allocation_price + # The license allocation price to add to the plan. + 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 + ) + ) + ) + end + attr_accessor :license_allocation_price + # The phase to add this price to. sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order @@ -321,6 +369,42 @@ module Orb sig do params( 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -363,6 +447,8 @@ module Orb def self.new( # 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 add this price to. plan_phase_order: nil, # New plan price request body params. @@ -374,6 +460,42 @@ module Orb override.returns( { 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -417,76 +539,60 @@ module Orb def to_hash end - # New plan price request body params. - module Price + # The license allocation price to add to the plan. + module LicenseAllocationPrice 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 + 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 ) end - class BulkWithFilters < Orb::Internal::Type::BaseModel + class Unit < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit, 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 + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol ) end attr_accessor :cadence @@ -495,6 +601,18 @@ 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::Unit::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -503,6 +621,13 @@ module Orb 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)) } @@ -603,12 +728,15 @@ module Orb sig do params( - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::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: @@ -636,14 +764,18 @@ 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 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, @@ -682,20 +814,23 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :bulk_with_filters + model_type: :unit ) end sig do override.returns( { - bulk_with_filters_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::OrSymbol, + 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: @@ -725,155 +860,6 @@ module Orb 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 @@ -882,7 +868,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -890,59 +876,110 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::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 + + 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 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::AddPrice::LicenseAllocationPrice::Tiered, + Orb::Internal::AnyHash + ) + end # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol ) end attr_accessor :cadence @@ -951,6 +988,18 @@ 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::Tiered::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -959,21 +1008,12 @@ 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 + # Configuration for tiered pricing + sig { returns(Orb::TieredConfig) } + attr_reader :tiered_config - sig do - params( - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_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. @@ -1076,11 +1116,14 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation::OrHash + ], name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::OrHash, + tiered_config: Orb::TieredConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1112,10 +1155,14 @@ 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:, # The name of the price. name:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, + # 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, @@ -1154,7 +1201,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :tiered_with_proration + model_type: :tiered ) end @@ -1162,12 +1209,15 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation + ], model_type: Symbol, name: String, - tiered_with_proration_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + tiered_config: Orb::TieredConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -1205,7 +1255,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1213,38 +1263,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::Cadence::TaggedSymbol ] ) end @@ -1252,133 +1302,97 @@ module Orb end end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation, 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 + # 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 - # Configuration for tiered_with_proration pricing sig do params( - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier::OrHash - ] + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).returns(T.attached_class) end def self.new( - # Tiers for rating based on total usage quantities into the specified tier with - # proration - tiers: + # 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( { - tiers: - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier - ] + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) 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 + class Bulk < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds, + Orb::BetaCreatePlanVersionParams::AddPrice::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::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for grouped_with_min_max_thresholds pricing + # 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( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation + ] ) 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 + attr_accessor :license_allocations # The pricing model type sig { returns(Symbol) } @@ -1488,11 +1502,14 @@ module Orb sig do params( + bulk_config: Orb::BulkConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation::OrHash + ], name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -1521,12 +1538,16 @@ 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:, - # 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 @@ -1567,18 +1588,21 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :grouped_with_min_max_thresholds + model_type: :bulk ) end sig do override.returns( { + bulk_config: Orb::BulkConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::OrSymbol, - grouped_with_min_max_thresholds_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation + ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1618,7 +1642,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -1626,38 +1650,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::Cadence::TaggedSymbol ] ) end @@ -1665,59 +1689,50 @@ module Orb end end - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation, 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 + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :maximum_charge + attr_accessor :amount - # The minimum amount to charge each group, regardless of usage + # The currency of the license allocation. sig { returns(String) } - attr_accessor :minimum_charge + attr_accessor :currency - # The base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # Configuration for grouped_with_min_max_thresholds pricing sig do params( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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: + # 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( { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -1726,43 +1741,55 @@ module Orb end end - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::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::Price::CumulativeGroupedAllocation::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig ) end - attr_accessor :cadence + attr_reader :bulk_with_filters_config - # Configuration for cumulative_grouped_allocation pricing sig do - returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - ) + params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - attr_reader :cumulative_grouped_allocation_config + attr_writer :bulk_with_filters_config + # The cadence to bill for this price on. sig do - params( - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash - ).void + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol + ) end - attr_writer :cumulative_grouped_allocation_config + 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::BulkWithFilters::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -1871,11 +1898,15 @@ module Orb sig do params( + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::OrHash, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, 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), @@ -1904,12 +1935,16 @@ 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 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 @@ -1950,18 +1985,22 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :cumulative_grouped_allocation + model_type: :bulk_with_filters ) end sig do override.returns( { + bulk_with_filters_config: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::OrSymbol, - cumulative_grouped_allocation_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation + ], model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -1993,6 +2032,155 @@ module Orb def to_hash end + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end + + # Property filters to apply (all must match) + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters 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 + ] + ).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::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } + ) + end + def to_hash + 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 + # The cadence to bill for this price on. module Cadence extend Orb::Internal::Type::Enum @@ -2001,7 +2189,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2009,38 +2197,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::Cadence::TaggedSymbol ] ) end @@ -2048,59 +2236,50 @@ module Orb end end - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation, Orb::Internal::AnyHash ) end - # The overall allocation across all groups - sig { returns(String) } - attr_accessor :cumulative_allocation - - # The allocation per individual group + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :group_allocation + attr_accessor :amount - # The event property used to group usage before applying allocations + # The currency of the license allocation. sig { returns(String) } - attr_accessor :grouping_key + attr_accessor :currency - # The amount to charge for each unit outside of the allocation - 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 - # Configuration for cumulative_grouped_allocation pricing sig do params( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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: + # 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( { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -2109,11 +2288,11 @@ module Orb end end - class Percent < Orb::Internal::Type::BaseModel + class Package < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package, Orb::Internal::AnyHash ) end @@ -2121,7 +2300,7 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol ) end attr_accessor :cadence @@ -2130,6 +2309,18 @@ 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::Package::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations + # The pricing model type sig { returns(Symbol) } attr_accessor :model_type @@ -2138,21 +2329,12 @@ 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 + # Configuration for package pricing + sig { returns(Orb::PackageConfig) } + attr_reader :package_config - sig do - params( - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash - ).void - end - attr_writer :percent_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. @@ -2255,11 +2437,14 @@ module Orb sig do params( cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation::OrHash + ], name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig::OrHash, + package_config: Orb::PackageConfig::OrHash, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2291,10 +2476,14 @@ 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:, # The name of the price. name:, - # Configuration for percent pricing - percent_config:, + # 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, @@ -2333,7 +2522,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :percent + model_type: :package ) end @@ -2341,12 +2530,15 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::OrSymbol, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation + ], model_type: Symbol, name: String, - percent_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + package_config: Orb::PackageConfig, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), billing_cycle_configuration: @@ -2384,7 +2576,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2392,38 +2584,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::Cadence::TaggedSymbol ] ) end @@ -2431,38 +2623,63 @@ module Orb end end - class PercentConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Package::LicenseAllocation, Orb::Internal::AnyHash ) end - # What percent of the component subtotals to charge - sig { returns(Float) } - attr_accessor :percent + # The amount of credits granted per active license per cadence. + sig { returns(String) } + attr_accessor :amount - # Configuration for percent pricing - sig { params(percent: Float).returns(T.attached_class) } + # 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( - # What percent of the component subtotals to charge - percent: + # 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 { override.returns({ percent: Float }) } + sig do + override.returns( + { + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) + } + ) + end def to_hash end end end - class EventOutput < Orb::Internal::Type::BaseModel + class Matrix < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix, Orb::Internal::AnyHash ) end @@ -2470,30 +2687,33 @@ module Orb # The cadence to bill for this price on. sig do returns( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol ) end attr_accessor :cadence - # Configuration for event_output pricing + # 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( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation + ] ) end - attr_reader :event_output_config + attr_accessor :license_allocations - sig do - params( - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config + # Configuration for matrix pricing + sig { returns(Orb::MatrixConfig) } + attr_reader :matrix_config - # The id of the item the price will be associated with. - sig { returns(String) } - attr_accessor :item_id + sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } + attr_writer :matrix_config # The pricing model type sig { returns(Symbol) } @@ -2604,10 +2824,13 @@ 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::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation::OrHash + ], + matrix_config: Orb::MatrixConfig::OrHash, name: String, billable_metric_id: T.nilable(String), billed_in_advance: T.nilable(T::Boolean), @@ -2638,10 +2861,14 @@ 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:, + # 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 @@ -2682,7 +2909,7 @@ module Orb # in the same API call. reference_id: nil, # The pricing model type - model_type: :event_output + model_type: :matrix ) end @@ -2690,10 +2917,13 @@ module Orb override.returns( { cadence: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::OrSymbol, - event_output_config: - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::OrSymbol, item_id: String, + license_allocations: + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation + ], + matrix_config: Orb::MatrixConfig, model_type: Symbol, name: String, billable_metric_id: T.nilable(String), @@ -2733,7 +2963,7 @@ module Orb T.type_alias do T.all( Symbol, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence ) end OrSymbol = T.type_alias { T.any(Symbol, String) } @@ -2741,38 +2971,38 @@ module Orb ANNUAL = T.let( :annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) SEMI_ANNUAL = T.let( :semi_annual, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) MONTHLY = T.let( :monthly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) QUARTERLY = T.let( :quarterly, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) ONE_TIME = T.let( :one_time, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) CUSTOM = T.let( :custom, - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ) sig do override.returns( T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::Cadence::TaggedSymbol + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::Cadence::TaggedSymbol ] ) end @@ -2780,57 +3010,50 @@ module Orb end end - class EventOutputConfig < Orb::Internal::Type::BaseModel + class LicenseAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Matrix::LicenseAllocation, Orb::Internal::AnyHash ) end - # The key in the event data to extract the unit rate from. + # The amount of credits granted per active license per cadence. sig { returns(String) } - attr_accessor :unit_rating_key + attr_accessor :amount - # 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 + # The currency of the license allocation. + sig { returns(String) } + attr_accessor :currency - # 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 + # When True, overage beyond the allocation is written off. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :write_off_overage - # Configuration for event_output pricing sig do params( - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) ).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 + # 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( { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) + amount: String, + currency: String, + write_off_overage: T.nilable(T::Boolean) } ) end @@ -2839,136 +3062,14537 @@ module Orb end end - sig do - override.returns( - T::Array[ - Orb::BetaCreatePlanVersionParams::AddPrice::Price::Variants - ] - ) - end - def self.variants - end - end - end + class ThresholdTotalAmount < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount, + 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::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # The id of the adjustment to remove from on the plan. - sig { returns(String) } - attr_accessor :adjustment_id + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The phase to remove 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::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::LicenseAllocation + ] + ) + end + attr_accessor :license_allocations - 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 pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - sig do - override.returns( - { adjustment_id: String, plan_phase_order: T.nilable(Integer) } - ) - end - def to_hash - end - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - class RemovePrice < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::BetaCreatePlanVersionParams::RemovePrice, - Orb::Internal::AnyHash - ) - end + # Configuration for threshold_total_amount pricing + sig do + returns( + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig + ) + end + attr_reader :threshold_total_amount_config - # The id of the price to remove from the plan. - sig { returns(String) } - attr_accessor :price_id + sig do + params( + threshold_total_amount_config: + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::ThresholdTotalAmountConfig::OrHash + ).void + end + attr_writer :threshold_total_amount_config - # 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::BetaCreatePlanVersionParams::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 - sig do - params( - adjustment: - T.any( - Orb::NewPercentageDiscount::OrHash, - Orb::NewUsageDiscount::OrHash, - Orb::NewAmountDiscount::OrHash, + # 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::ThresholdTotalAmount::Cadence::OrSymbol, + 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: + 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::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::OrSymbol, + 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: + 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::ThresholdTotalAmount::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::ThresholdTotalAmount::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::AddPrice::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::AddPrice::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::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 + + # 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 + + 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 + + class ConsumptionTable < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::AddPrice::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::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 + + # License allocations to associate with 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 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::AddPrice::LicenseAllocationPrice::TieredPackage::TieredPackageConfig + ) + end + attr_reader :tiered_package_config + + sig do + params( + tiered_package_config: + Orb::BetaCreatePlanVersionParams::AddPrice::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::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 ), @@ -2976,234 +17600,14852 @@ module Orb 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 - ) + 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 - 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 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 + + 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::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: + ) + 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::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 + + # 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::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 + + 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) + } + ) + 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::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + 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 + override.returns( + T::Array[ + Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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 - # The definition of a new adjustment to create and add to the plan. - module Adjustment - extend Orb::Internal::Type::Union + class LicenseAllocation < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::LicenseAllocation, + Orb::Internal::AnyHash + ) + end - Variants = - T.type_alias do - T.any( - Orb::NewPercentageDiscount, - Orb::NewUsageDiscount, - Orb::NewAmountDiscount, - Orb::NewMinimum, - Orb::NewMaximum + # 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::ReplaceAdjustment::Adjustment::Variants + Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 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), - 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 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), - 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 # New plan price request body params. module Price diff --git a/rbi/orb/models/beta_fetch_plan_version_params.rbi b/rbi/orb/models/beta_fetch_plan_version_params.rbi index 426701605..a498d43d9 100644 --- a/rbi/orb/models/beta_fetch_plan_version_params.rbi +++ b/rbi/orb/models/beta_fetch_plan_version_params.rbi @@ -14,18 +14,26 @@ module Orb sig { returns(String) } attr_accessor :plan_id + sig { returns(String) } + attr_accessor :version + sig do params( plan_id: String, + version: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(plan_id:, request_options: {}) + def self.new(plan_id:, version:, request_options: {}) end sig do override.returns( - { plan_id: String, request_options: Orb::RequestOptions } + { + plan_id: String, + version: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/beta_set_default_plan_version_params.rbi b/rbi/orb/models/beta_set_default_plan_version_params.rbi index 7e3ecb521..edb5b8f07 100644 --- a/rbi/orb/models/beta_set_default_plan_version_params.rbi +++ b/rbi/orb/models/beta_set_default_plan_version_params.rbi @@ -11,17 +11,22 @@ module Orb T.any(Orb::BetaSetDefaultPlanVersionParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :plan_id + # Plan version to set as the default. sig { returns(Integer) } attr_accessor :version sig do params( + plan_id: String, version: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + plan_id:, # Plan version to set as the default. version:, request_options: {} @@ -30,7 +35,11 @@ module Orb sig do override.returns( - { version: Integer, request_options: Orb::RequestOptions } + { + plan_id: String, + version: Integer, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/coupon_archive_params.rbi b/rbi/orb/models/coupon_archive_params.rbi index 2f644fa18..7e1de0c53 100644 --- a/rbi/orb/models/coupon_archive_params.rbi +++ b/rbi/orb/models/coupon_archive_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::CouponArchiveParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :coupon_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + coupon_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(coupon_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { coupon_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/coupon_fetch_params.rbi b/rbi/orb/models/coupon_fetch_params.rbi index a9ba680d2..a9d2e3bb8 100644 --- a/rbi/orb/models/coupon_fetch_params.rbi +++ b/rbi/orb/models/coupon_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::CouponFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :coupon_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + coupon_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(coupon_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { coupon_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/coupons/subscription_list_params.rbi b/rbi/orb/models/coupons/subscription_list_params.rbi index 8de2f0740..c3e319670 100644 --- a/rbi/orb/models/coupons/subscription_list_params.rbi +++ b/rbi/orb/models/coupons/subscription_list_params.rbi @@ -12,6 +12,9 @@ module Orb T.any(Orb::Coupons::SubscriptionListParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :coupon_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -26,12 +29,14 @@ module Orb sig do params( + coupon_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + coupon_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -44,6 +49,7 @@ module Orb sig do override.returns( { + coupon_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions diff --git a/rbi/orb/models/credit_block_delete_params.rbi b/rbi/orb/models/credit_block_delete_params.rbi index c435a18da..c6611bb37 100644 --- a/rbi/orb/models/credit_block_delete_params.rbi +++ b/rbi/orb/models/credit_block_delete_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CreditBlockDeleteParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :block_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + block_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(block_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { block_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/credit_block_list_invoices_params.rbi b/rbi/orb/models/credit_block_list_invoices_params.rbi index 8d8d97aab..4621d4cbe 100644 --- a/rbi/orb/models/credit_block_list_invoices_params.rbi +++ b/rbi/orb/models/credit_block_list_invoices_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CreditBlockListInvoicesParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :block_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + block_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(block_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { block_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/credit_block_retrieve_params.rbi b/rbi/orb/models/credit_block_retrieve_params.rbi index 7ed590808..d1a13230d 100644 --- a/rbi/orb/models/credit_block_retrieve_params.rbi +++ b/rbi/orb/models/credit_block_retrieve_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CreditBlockRetrieveParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :block_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + block_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(block_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { block_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/credit_note_fetch_params.rbi b/rbi/orb/models/credit_note_fetch_params.rbi index a30f85730..c3f17f91f 100644 --- a/rbi/orb/models/credit_note_fetch_params.rbi +++ b/rbi/orb/models/credit_note_fetch_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CreditNoteFetchParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :credit_note_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + credit_note_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(credit_note_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { credit_note_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/customer.rbi b/rbi/orb/models/customer.rbi index fc0e32d01..b10691a0d 100644 --- a/rbi/orb/models/customer.rbi +++ b/rbi/orb/models/customer.rbi @@ -636,6 +636,11 @@ module Orb T.let(:stripe_invoice, Orb::Customer::PaymentProvider::TaggedSymbol) NETSUITE = T.let(:netsuite, Orb::Customer::PaymentProvider::TaggedSymbol) + NETSUITE_AMPERSAND = + T.let( + :netsuite_ampersand, + Orb::Customer::PaymentProvider::TaggedSymbol + ) sig do override.returns( @@ -756,6 +761,11 @@ 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/rbi/orb/models/customer_create_params.rbi b/rbi/orb/models/customer_create_params.rbi index eb42f1b6b..cfc5ee528 100644 --- a/rbi/orb/models/customer_create_params.rbi +++ b/rbi/orb/models/customer_create_params.rbi @@ -779,6 +779,11 @@ module Orb :netsuite, Orb::CustomerCreateParams::PaymentProvider::TaggedSymbol ) + NETSUITE_AMPERSAND = + T.let( + :netsuite_ampersand, + Orb::CustomerCreateParams::PaymentProvider::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/orb/models/customer_delete_params.rbi b/rbi/orb/models/customer_delete_params.rbi index bb5a5e7a8..fb2d0af95 100644 --- a/rbi/orb/models/customer_delete_params.rbi +++ b/rbi/orb/models/customer_delete_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CustomerDeleteParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :customer_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + customer_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(customer_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { customer_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/customer_fetch_by_external_id_params.rbi b/rbi/orb/models/customer_fetch_by_external_id_params.rbi index 5d0118231..8c4b5cbba 100644 --- a/rbi/orb/models/customer_fetch_by_external_id_params.rbi +++ b/rbi/orb/models/customer_fetch_by_external_id_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::CustomerFetchByExternalIDParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :external_customer_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + external_customer_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(external_customer_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { external_customer_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/customer_fetch_params.rbi b/rbi/orb/models/customer_fetch_params.rbi index 7681401d5..1396da854 100644 --- a/rbi/orb/models/customer_fetch_params.rbi +++ b/rbi/orb/models/customer_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::CustomerFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :customer_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + customer_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(customer_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { customer_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi b/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi index 33317dfe9..4271d43de 100644 --- a/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +++ b/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi @@ -14,15 +14,23 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + external_customer_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(external_customer_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { external_customer_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi b/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi index db0b03c3e..82cab725c 100644 --- a/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +++ b/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi @@ -14,15 +14,23 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + customer_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(customer_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { customer_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end 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 23097ea7d..b18905deb 100644 --- a/rbi/orb/models/customer_update_by_external_id_params.rbi +++ b/rbi/orb/models/customer_update_by_external_id_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::CustomerUpdateByExternalIDParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :id + sig { returns(T.nilable(Orb::NewAccountingSyncConfiguration)) } attr_reader :accounting_sync_configuration @@ -47,8 +50,10 @@ module Orb sig { params(billing_address: T.nilable(Orb::AddressInput::OrHash)).void } attr_writer :billing_address - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -314,6 +319,7 @@ module Orb sig do params( + id: String, accounting_sync_configuration: T.nilable(Orb::NewAccountingSyncConfiguration::OrHash), additional_emails: T.nilable(T::Array[String]), @@ -355,6 +361,7 @@ module Orb ).returns(T.attached_class) end def self.new( + id:, accounting_sync_configuration: nil, # Additional email addresses for this customer. If populated, these email # addresses will be CC'd for customer communications. The total number of email @@ -370,8 +377,10 @@ module Orb # will be inherited from the account-level setting. auto_issuance: nil, billing_address: nil, - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. currency: nil, # A valid customer email, to be used for invoicing and notifications. email: nil, @@ -560,6 +569,7 @@ module Orb sig do override.returns( { + id: String, accounting_sync_configuration: T.nilable(Orb::NewAccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), @@ -798,6 +808,11 @@ module Orb :netsuite, Orb::CustomerUpdateByExternalIDParams::PaymentProvider::TaggedSymbol ) + NETSUITE_AMPERSAND = + T.let( + :netsuite_ampersand, + Orb::CustomerUpdateByExternalIDParams::PaymentProvider::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/orb/models/customer_update_params.rbi b/rbi/orb/models/customer_update_params.rbi index 86b124072..ef51bccf1 100644 --- a/rbi/orb/models/customer_update_params.rbi +++ b/rbi/orb/models/customer_update_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::CustomerUpdateParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :customer_id + sig { returns(T.nilable(Orb::NewAccountingSyncConfiguration)) } attr_reader :accounting_sync_configuration @@ -47,8 +50,10 @@ module Orb sig { params(billing_address: T.nilable(Orb::AddressInput::OrHash)).void } attr_writer :billing_address - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -306,6 +311,7 @@ module Orb sig do params( + customer_id: String, accounting_sync_configuration: T.nilable(Orb::NewAccountingSyncConfiguration::OrHash), additional_emails: T.nilable(T::Array[String]), @@ -343,6 +349,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, accounting_sync_configuration: nil, # Additional email addresses for this customer. If populated, these email # addresses will be CC'd for customer communications. The total number of email @@ -358,8 +365,10 @@ module Orb # will be inherited from the account-level setting. auto_issuance: nil, billing_address: nil, - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. currency: nil, # A valid customer email, to be used for invoicing and notifications. email: nil, @@ -548,6 +557,7 @@ module Orb sig do override.returns( { + customer_id: String, accounting_sync_configuration: T.nilable(Orb::NewAccountingSyncConfiguration), additional_emails: T.nilable(T::Array[String]), @@ -779,6 +789,11 @@ module Orb :netsuite, Orb::CustomerUpdateParams::PaymentProvider::TaggedSymbol ) + NETSUITE_AMPERSAND = + T.let( + :netsuite_ampersand, + Orb::CustomerUpdateParams::PaymentProvider::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/orb/models/customers/balance_transaction_create_params.rbi b/rbi/orb/models/customers/balance_transaction_create_params.rbi index e467c92d1..ea554f86e 100644 --- a/rbi/orb/models/customers/balance_transaction_create_params.rbi +++ b/rbi/orb/models/customers/balance_transaction_create_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + sig { returns(String) } attr_accessor :amount @@ -31,6 +34,7 @@ module Orb sig do params( + customer_id: String, amount: String, type: Orb::Customers::BalanceTransactionCreateParams::Type::OrSymbol, @@ -39,6 +43,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, amount:, type:, # An optional description that can be specified around this entry. @@ -50,6 +55,7 @@ module Orb sig do override.returns( { + customer_id: String, amount: String, type: Orb::Customers::BalanceTransactionCreateParams::Type::OrSymbol, diff --git a/rbi/orb/models/customers/balance_transaction_list_params.rbi b/rbi/orb/models/customers/balance_transaction_list_params.rbi index a8bfb3bfa..ffcfe9024 100644 --- a/rbi/orb/models/customers/balance_transaction_list_params.rbi +++ b/rbi/orb/models/customers/balance_transaction_list_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -41,6 +44,7 @@ module Orb sig do params( + customer_id: String, cursor: T.nilable(String), limit: Integer, operation_time_gt: T.nilable(Time), @@ -51,6 +55,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -67,6 +72,7 @@ module Orb sig do override.returns( { + customer_id: String, cursor: T.nilable(String), limit: Integer, operation_time_gt: T.nilable(Time), diff --git a/rbi/orb/models/customers/cost_list_by_external_id_params.rbi b/rbi/orb/models/customers/cost_list_by_external_id_params.rbi index f56c29d12..21dacf940 100644 --- a/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +++ b/rbi/orb/models/customers/cost_list_by_external_id_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -42,6 +45,7 @@ module Orb sig do params( + external_customer_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), @@ -53,6 +57,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_customer_id:, # The currency or custom pricing unit to use. currency: nil, # Costs returned are exclusive of `timeframe_end`. @@ -71,6 +76,7 @@ module Orb sig do override.returns( { + external_customer_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), diff --git a/rbi/orb/models/customers/cost_list_params.rbi b/rbi/orb/models/customers/cost_list_params.rbi index d45b4cf5b..e6a1cbd38 100644 --- a/rbi/orb/models/customers/cost_list_params.rbi +++ b/rbi/orb/models/customers/cost_list_params.rbi @@ -12,6 +12,9 @@ module Orb T.any(Orb::Customers::CostListParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :customer_id + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -35,6 +38,7 @@ module Orb sig do params( + customer_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), @@ -44,6 +48,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, # The currency or custom pricing unit to use. currency: nil, # Costs returned are exclusive of `timeframe_end`. @@ -62,6 +67,7 @@ module Orb sig do override.returns( { + customer_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), diff --git a/rbi/orb/models/customers/credit_list_by_external_id_params.rbi b/rbi/orb/models/customers/credit_list_by_external_id_params.rbi index d5ad68fdb..f99d67b88 100644 --- a/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credit_list_by_external_id_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -53,6 +56,7 @@ module Orb sig do params( + external_customer_id: String, currency: T.nilable(String), cursor: T.nilable(String), effective_date_gt: T.nilable(Time), @@ -65,6 +69,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_customer_id:, # The ledger currency or custom pricing unit to use. currency: nil, # Cursor for pagination. This can be populated by the `next_cursor` value returned @@ -86,6 +91,7 @@ module Orb sig do override.returns( { + external_customer_id: String, currency: T.nilable(String), cursor: T.nilable(String), effective_date_gt: T.nilable(Time), diff --git a/rbi/orb/models/customers/credit_list_params.rbi b/rbi/orb/models/customers/credit_list_params.rbi index dff33b8ec..f8043337c 100644 --- a/rbi/orb/models/customers/credit_list_params.rbi +++ b/rbi/orb/models/customers/credit_list_params.rbi @@ -12,6 +12,9 @@ module Orb T.any(Orb::Customers::CreditListParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :customer_id + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -50,6 +53,7 @@ module Orb sig do params( + customer_id: String, currency: T.nilable(String), cursor: T.nilable(String), effective_date_gt: T.nilable(Time), @@ -62,6 +66,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, # The ledger currency or custom pricing unit to use. currency: nil, # Cursor for pagination. This can be populated by the `next_cursor` value returned @@ -83,6 +88,7 @@ module Orb sig do override.returns( { + customer_id: String, currency: T.nilable(String), cursor: T.nilable(String), effective_date_gt: T.nilable(Time), 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 581e0385d..4f3830ad8 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 @@ -16,206 +16,50 @@ module Orb ) end - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - sig { returns(Float) } - attr_accessor :amount - - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol - ) - end - attr_accessor :entry_type - - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - sig { returns(T.nilable(String)) } - attr_accessor :description - - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - sig { returns(T.nilable(Time)) } - attr_accessor :effective_date - - # An ISO 8601 format date that identifies the origination credit block to expire - sig { returns(T.nilable(Time)) } - attr_accessor :expiry_date - - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - sig do - returns( - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter - ] - ) - ) - end - attr_accessor :filters - - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings - ) - ) - end - attr_reader :invoice_settings - - sig do - params( - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::OrHash - ) - ).void - end - attr_writer :invoice_settings - - # User-specified key/value pairs for the resource. 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 - - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - sig { returns(T.nilable(String)) } - attr_accessor :per_unit_cost_basis - - # 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. - sig { returns(Date) } - attr_accessor :target_expiry_date - - # The ID of the block to reverse a decrement from. sig { returns(String) } - attr_accessor :block_id + attr_accessor :external_customer_id - # Can only be specified when `entry_type=void`. The reason for the void. sig do returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::OrSymbol + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment ) ) end - attr_accessor :void_reason + attr_accessor :body sig do params( - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol, - target_expiry_date: Date, - block_id: String, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::OrHash - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::OrHash - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::OrSymbol + external_customer_id: String, + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment::OrHash ), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new( - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - amount:, - 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. - target_expiry_date:, - # The ID of the block to reverse a decrement from. - block_id:, - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - currency: nil, - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - description: nil, - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - effective_date: nil, - # An ISO 8601 format date that identifies the origination credit block to expire - expiry_date: nil, - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - filters: nil, - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - invoice_settings: 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, - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - per_unit_cost_basis: nil, - # Can only be specified when `entry_type=void`. The reason for the void. - void_reason: nil, - request_options: {} - ) + def self.new(external_customer_id:, body:, request_options: {}) end sig do override.returns( { - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - target_expiry_date: Date, - block_id: String, - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::OrSymbol + external_customer_id: String, + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment ), request_options: Orb::RequestOptions } @@ -224,375 +68,914 @@ module Orb def to_hash end - module EntryType - extend Orb::Internal::Type::Enum + module Body + extend Orb::Internal::Type::Union - TaggedSymbol = + Variants = T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - AMENDMENT = - T.let( - :amendment, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::TaggedSymbol - ) + class Increment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::TaggedSymbol - ] - ) - end - def self.values - end - end + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter, - Orb::Internal::AnyHash + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + sig { returns(T.nilable(Time)) } + attr_accessor :effective_date + + # An ISO 8601 format date that denotes when this credit balance should expire. + sig { returns(T.nilable(Time)) } + attr_accessor :expiry_date + + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + sig do + returns( + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter + ] + ) ) end + attr_accessor :filters - # The property of the price the block applies to. Only item_id is supported. - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field::OrSymbol - ) - end - attr_accessor :field + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings + ) + ) + end + attr_reader :invoice_settings - # Should prices that match the filter be included or excluded. - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::OrSymbol - ) - end - attr_accessor :operator + sig do + params( + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::OrHash + ) + ).void + end + attr_writer :invoice_settings - # The IDs or values that match this filter. - sig { returns(T::Array[String]) } - attr_accessor :values + # User-specified key/value pairs for the resource. 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 PriceFilter that only allows item_id field for block filters. - sig do - params( - field: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field::OrSymbol, - operator: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::OrSymbol, - values: T::Array[String] - ).returns(T.attached_class) - end - def self.new( - # The property of the price the block applies to. Only item_id is supported. - field:, - # Should prices that match the filter be included or excluded. - operator:, - # The IDs or values that match this filter. - values: - ) - end + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + sig { returns(T.nilable(String)) } + attr_accessor :per_unit_cost_basis - sig do - override.returns( - { - field: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field::OrSymbol, - operator: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::OrSymbol, - values: T::Array[String] - } + sig do + params( + amount: Float, + currency: T.nilable(String), + description: T.nilable(String), + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + filters: + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::OrHash + ] + ), + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::OrHash + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + per_unit_cost_basis: T.nilable(String), + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: nil, + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + effective_date: nil, + # An ISO 8601 format date that denotes when this credit balance should expire. + expiry_date: nil, + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + filters: nil, + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + invoice_settings: 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, + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + per_unit_cost_basis: nil, + entry_type: :increment ) - end - def to_hash - end + end - # The property of the price the block applies to. Only item_id is supported. - module Field - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + amount: Float, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + filters: + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter + ] + ), + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter, + Orb::Internal::AnyHash + ) + end + + # The property of the price the block applies to. Only item_id is supported. + sig do + returns( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field::OrSymbol ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :field - ITEM_ID = - T.let( - :item_id, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field::TaggedSymbol + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::OrSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + # A PriceFilter that only allows item_id field for block filters. + sig do + params( + field: + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field::OrSymbol, + operator: + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price the block applies to. Only item_id is supported. + 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( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Field::TaggedSymbol - ] - ) + sig do + override.returns( + { + field: + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field::OrSymbol, + operator: + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::OrSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price the block applies to. Only item_id is supported. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ITEM_ID = + T.let( + :item_id, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::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::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end end - def self.values + + class InvoiceSettings < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings, + Orb::Internal::AnyHash + ) + end + + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + sig { returns(T::Boolean) } + attr_accessor :auto_collection + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ) + ) + end + attr_accessor :custom_due_date + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ) + ) + end + attr_accessor :invoice_date + + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + sig { returns(T.nilable(String)) } + attr_accessor :item_id + + # If true, the new credits purchase invoice will be marked as paid. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :mark_as_paid + + sig { params(mark_as_paid: T::Boolean).void } + attr_writer :mark_as_paid + + # An optional memo to display on the invoice. + sig { returns(T.nilable(String)) } + attr_accessor :memo + + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + sig { returns(T.nilable(Integer)) } + attr_accessor :net_terms + + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :require_successful_payment + + sig { params(require_successful_payment: T::Boolean).void } + attr_writer :require_successful_payment + + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + sig do + params( + auto_collection: T::Boolean, + custom_due_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ), + invoice_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ), + item_id: T.nilable(String), + mark_as_paid: T::Boolean, + memo: T.nilable(String), + net_terms: T.nilable(Integer), + require_successful_payment: T::Boolean + ).returns(T.attached_class) + end + def self.new( + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + auto_collection:, + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + custom_due_date: nil, + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + invoice_date: nil, + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + item_id: nil, + # If true, the new credits purchase invoice will be marked as paid. + mark_as_paid: nil, + # An optional memo to display on the invoice. + memo: nil, + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + net_terms: nil, + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + require_successful_payment: nil + ) + end + + sig do + override.returns( + { + auto_collection: T::Boolean, + custom_due_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ), + invoice_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ), + item_id: T.nilable(String), + mark_as_paid: T::Boolean, + memo: T.nilable(String), + net_terms: T.nilable(Integer), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + module CustomDueDate + extend Orb::Internal::Type::Union + + Variants = T.type_alias { T.any(Date, Time) } + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ] + ) + end + def self.variants + end + end + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + module InvoiceDate + extend Orb::Internal::Type::Union + + Variants = T.type_alias { T.any(Date, Time) } + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ] + ) + end + def self.variants + end + end end end - # Should prices that match the filter be included or excluded. - module Operator - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class Decrement < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - INCLUDES = - T.let( - :includes, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::TaggedSymbol - ) - EXCLUDES = - T.let( - :excludes, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::TaggedSymbol - ) + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # User-specified key/value pairs for the resource. 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( + amount: Float, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + entry_type: :decrement + ) + end sig do override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::Operator::TaggedSymbol - ] + { + amount: Float, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) end - def self.values + def to_hash end end - end - class InvoiceSettings < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, - Orb::Internal::AnyHash - ) - end + class ExpirationChange < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, + Orb::Internal::AnyHash + ) + end - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - sig { returns(T::Boolean) } - attr_accessor :auto_collection + 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. + sig { returns(Date) } + attr_accessor :target_expiry_date + + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(T.nilable(Float)) } + attr_accessor :amount + + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + sig { returns(T.nilable(String)) } + attr_accessor :block_id + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # An ISO 8601 format date that identifies the origination credit block to expire + sig { returns(T.nilable(Time)) } + attr_accessor :expiry_date + + # User-specified key/value pairs for the resource. 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 - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::CustomDueDate::Variants - ) + sig do + params( + target_expiry_date: Date, + amount: T.nilable(Float), + block_id: T.nilable(String), + currency: T.nilable(String), + description: T.nilable(String), + expiry_date: T.nilable(Time), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).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. + target_expiry_date:, + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount: nil, + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + block_id: nil, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: nil, + # An ISO 8601 format date that identifies the origination credit block to expire + expiry_date: 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, + entry_type: :expiration_change ) - end - attr_accessor :custom_due_date + end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants + sig do + override.returns( + { + entry_type: Symbol, + target_expiry_date: Date, + amount: T.nilable(Float), + block_id: T.nilable(String), + currency: T.nilable(String), + description: T.nilable(String), + expiry_date: T.nilable(Time), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) - ) + end + def to_hash + end end - attr_accessor :invoice_date - - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - sig { returns(T.nilable(String)) } - attr_accessor :item_id - - # If true, the new credits purchase invoice will be marked as paid. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :mark_as_paid - - sig { params(mark_as_paid: T::Boolean).void } - attr_writer :mark_as_paid - - # An optional memo to display on the invoice. - sig { returns(T.nilable(String)) } - attr_accessor :memo - - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - sig { returns(T.nilable(Integer)) } - attr_accessor :net_terms - - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :require_successful_payment - - sig { params(require_successful_payment: T::Boolean).void } - attr_writer :require_successful_payment - - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - sig do - params( - auto_collection: T::Boolean, - custom_due_date: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::CustomDueDate::Variants - ), - invoice_date: + + class Void < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, + Orb::Internal::AnyHash + ) + end + + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount + + # The ID of the block to void. + sig { returns(String) } + attr_accessor :block_id + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # User-specified key/value pairs for the resource. 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 + + # Can only be specified when `entry_type=void`. The reason for the void. + sig do + returns( T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants - ), - item_id: T.nilable(String), - mark_as_paid: T::Boolean, - memo: T.nilable(String), - net_terms: T.nilable(Integer), - require_successful_payment: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - auto_collection:, - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - custom_due_date: nil, - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - invoice_date: nil, - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - item_id: nil, - # If true, the new credits purchase invoice will be marked as paid. - mark_as_paid: nil, - # An optional memo to display on the invoice. - memo: nil, - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - net_terms: nil, - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - require_successful_payment: nil - ) - end + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason::OrSymbol + ) + ) + end + attr_accessor :void_reason - sig do - override.returns( - { - auto_collection: T::Boolean, - custom_due_date: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::CustomDueDate::Variants - ), - invoice_date: + sig do + params( + amount: Float, + block_id: String, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + void_reason: T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason::OrSymbol ), - item_id: T.nilable(String), - mark_as_paid: T::Boolean, - memo: T.nilable(String), - net_terms: T.nilable(Integer), - require_successful_payment: T::Boolean - } + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The ID of the block to void. + block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + # Can only be specified when `entry_type=void`. The reason for the void. + void_reason: nil, + entry_type: :void ) - end - def to_hash - end - - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - module CustomDueDate - extend Orb::Internal::Type::Union - - Variants = T.type_alias { T.any(Date, Time) } + end sig do override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::CustomDueDate::Variants - ] + { + amount: Float, + block_id: String, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + void_reason: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason::OrSymbol + ) + } ) end - def self.variants + def to_hash + end + + # Can only be specified when `entry_type=void`. The reason for the void. + module VoidReason + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REFUND = + T.let( + :refund, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::VoidReason::TaggedSymbol + ] + ) + end + def self.values + end end end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - module InvoiceDate - extend Orb::Internal::Type::Union + class Amendment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment, + Orb::Internal::AnyHash + ) + end + + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + sig { returns(Float) } + attr_accessor :amount + + # The ID of the block to reverse a decrement from. + sig { returns(String) } + attr_accessor :block_id + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description - Variants = T.type_alias { T.any(Date, Time) } + # User-specified key/value pairs for the resource. 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 - override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants - ] - ) + params( + amount: Float, + block_id: String, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).returns(T.attached_class) end - def self.variants + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + amount:, + # The ID of the block to reverse a decrement from. + block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + entry_type: :amendment + ) end - end - end - - # Can only be specified when `entry_type=void`. The reason for the void. - module VoidReason - extend Orb::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason + sig do + override.returns( + { + amount: Float, + block_id: String, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - REFUND = - T.let( - :refund, - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::TaggedSymbol - ) + def to_hash + end + end sig do override.returns( T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::TaggedSymbol + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Variants ] ) end - def self.values + def self.variants end end end 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 e4a7bae1f..993b66947 100644 --- a/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi @@ -16,206 +16,50 @@ module Orb ) end - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - sig { returns(Float) } - attr_accessor :amount - - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol - ) - end - attr_accessor :entry_type - - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - sig { returns(T.nilable(String)) } - attr_accessor :currency - - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - sig { returns(T.nilable(String)) } - attr_accessor :description - - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - sig { returns(T.nilable(Time)) } - attr_accessor :effective_date - - # An ISO 8601 format date that identifies the origination credit block to expire - sig { returns(T.nilable(Time)) } - attr_accessor :expiry_date - - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - sig do - returns( - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter - ] - ) - ) - end - attr_accessor :filters - - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings - ) - ) - end - attr_reader :invoice_settings - - sig do - params( - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::OrHash - ) - ).void - end - attr_writer :invoice_settings - - # User-specified key/value pairs for the resource. 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 - - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - sig { returns(T.nilable(String)) } - attr_accessor :per_unit_cost_basis - - # 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. - sig { returns(Date) } - attr_accessor :target_expiry_date - - # The ID of the block to reverse a decrement from. sig { returns(String) } - attr_accessor :block_id + attr_accessor :customer_id - # Can only be specified when `entry_type=void`. The reason for the void. sig do returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::OrSymbol + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment ) ) end - attr_accessor :void_reason + attr_accessor :body sig do params( - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol, - target_expiry_date: Date, - block_id: String, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::OrHash - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::OrHash - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::OrSymbol + customer_id: String, + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment::OrHash ), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new( - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - amount:, - 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. - target_expiry_date:, - # The ID of the block to reverse a decrement from. - block_id:, - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - currency: nil, - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - description: nil, - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - effective_date: nil, - # An ISO 8601 format date that identifies the origination credit block to expire - expiry_date: nil, - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - filters: nil, - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - invoice_settings: 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, - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - per_unit_cost_basis: nil, - # Can only be specified when `entry_type=void`. The reason for the void. - void_reason: nil, - request_options: {} - ) + def self.new(customer_id:, body:, request_options: {}) end sig do override.returns( { - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - target_expiry_date: Date, - block_id: String, - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::OrSymbol + customer_id: String, + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment ), request_options: Orb::RequestOptions } @@ -224,375 +68,914 @@ module Orb def to_hash end - module EntryType - extend Orb::Internal::Type::Enum + module Body + extend Orb::Internal::Type::Union - TaggedSymbol = + Variants = T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - AMENDMENT = - T.let( - :amendment, - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::TaggedSymbol - ) + class Increment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::TaggedSymbol - ] - ) - end - def self.values - end - end + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Customers::Credits::LedgerCreateEntryParams::Filter, - Orb::Internal::AnyHash + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + sig { returns(T.nilable(Time)) } + attr_accessor :effective_date + + # An ISO 8601 format date that denotes when this credit balance should expire. + sig { returns(T.nilable(Time)) } + attr_accessor :expiry_date + + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + sig do + returns( + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter + ] + ) ) end + attr_accessor :filters - # The property of the price the block applies to. Only item_id is supported. - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field::OrSymbol - ) - end - attr_accessor :field + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings + ) + ) + end + attr_reader :invoice_settings - # Should prices that match the filter be included or excluded. - sig do - returns( - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::OrSymbol - ) - end - attr_accessor :operator + sig do + params( + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::OrHash + ) + ).void + end + attr_writer :invoice_settings - # The IDs or values that match this filter. - sig { returns(T::Array[String]) } - attr_accessor :values + # User-specified key/value pairs for the resource. 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 PriceFilter that only allows item_id field for block filters. - sig do - params( - field: - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field::OrSymbol, - operator: - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::OrSymbol, - values: T::Array[String] - ).returns(T.attached_class) - end - def self.new( - # The property of the price the block applies to. Only item_id is supported. - field:, - # Should prices that match the filter be included or excluded. - operator:, - # The IDs or values that match this filter. - values: - ) - end + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + sig { returns(T.nilable(String)) } + attr_accessor :per_unit_cost_basis - sig do - override.returns( - { - field: - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field::OrSymbol, - operator: - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::OrSymbol, - values: T::Array[String] - } + sig do + params( + amount: Float, + currency: T.nilable(String), + description: T.nilable(String), + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + filters: + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::OrHash + ] + ), + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::OrHash + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + per_unit_cost_basis: T.nilable(String), + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: nil, + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. + effective_date: nil, + # An ISO 8601 format date that denotes when this credit balance should expire. + expiry_date: nil, + # Optional filter to specify which items this credit block applies to. If not + # specified, the block will apply to all items for the pricing unit. + filters: nil, + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + invoice_settings: 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, + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block + per_unit_cost_basis: nil, + entry_type: :increment ) - end - def to_hash - end + end - # The property of the price the block applies to. Only item_id is supported. - module Field - extend Orb::Internal::Type::Enum + sig do + override.returns( + { + amount: Float, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + effective_date: T.nilable(Time), + expiry_date: T.nilable(Time), + filters: + T.nilable( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter + ] + ), + invoice_settings: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings + ), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + per_unit_cost_basis: T.nilable(String) + } + ) + end + def to_hash + end - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter, + Orb::Internal::AnyHash + ) + end + + # The property of the price the block applies to. Only item_id is supported. + sig do + returns( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field::OrSymbol ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } + attr_accessor :field - ITEM_ID = - T.let( - :item_id, - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field::TaggedSymbol + # Should prices that match the filter be included or excluded. + sig do + returns( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::OrSymbol + ) + end + attr_accessor :operator + + # The IDs or values that match this filter. + sig { returns(T::Array[String]) } + attr_accessor :values + + # A PriceFilter that only allows item_id field for block filters. + sig do + params( + field: + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field::OrSymbol, + operator: + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::OrSymbol, + values: T::Array[String] + ).returns(T.attached_class) + end + def self.new( + # The property of the price the block applies to. Only item_id is supported. + 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( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Field::TaggedSymbol - ] - ) + sig do + override.returns( + { + field: + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field::OrSymbol, + operator: + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::OrSymbol, + values: T::Array[String] + } + ) + end + def to_hash + end + + # The property of the price the block applies to. Only item_id is supported. + module Field + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ITEM_ID = + T.let( + :item_id, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Field::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::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::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + INCLUDES = + T.let( + :includes, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::TaggedSymbol + ) + EXCLUDES = + T.let( + :excludes, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end end - def self.values + + class InvoiceSettings < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings, + Orb::Internal::AnyHash + ) + end + + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + sig { returns(T::Boolean) } + attr_accessor :auto_collection + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ) + ) + end + attr_accessor :custom_due_date + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + sig do + returns( + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ) + ) + end + attr_accessor :invoice_date + + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + sig { returns(T.nilable(String)) } + attr_accessor :item_id + + # If true, the new credits purchase invoice will be marked as paid. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :mark_as_paid + + sig { params(mark_as_paid: T::Boolean).void } + attr_writer :mark_as_paid + + # An optional memo to display on the invoice. + sig { returns(T.nilable(String)) } + attr_accessor :memo + + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + sig { returns(T.nilable(Integer)) } + attr_accessor :net_terms + + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + sig { returns(T.nilable(T::Boolean)) } + attr_reader :require_successful_payment + + sig { params(require_successful_payment: T::Boolean).void } + attr_writer :require_successful_payment + + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. + sig do + params( + auto_collection: T::Boolean, + custom_due_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ), + invoice_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ), + item_id: T.nilable(String), + mark_as_paid: T::Boolean, + memo: T.nilable(String), + net_terms: T.nilable(Integer), + require_successful_payment: T::Boolean + ).returns(T.attached_class) + end + def self.new( + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. + auto_collection:, + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + custom_due_date: nil, + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + invoice_date: nil, + # The ID of the Item to be used for the invoice line item. If not provided, a + # default 'Credits' item will be used. + item_id: nil, + # If true, the new credits purchase invoice will be marked as paid. + mark_as_paid: nil, + # An optional memo to display on the invoice. + memo: nil, + # The net terms determines the due date of the invoice. Due date is calculated + # based on the invoice or issuance date, depending on the account's configured due + # date calculation method. A value of '0' here represents that the invoice is due + # on issue, whereas a value of '30' represents that the customer has 30 days to + # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not + # both. + net_terms: nil, + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. + require_successful_payment: nil + ) + end + + sig do + override.returns( + { + auto_collection: T::Boolean, + custom_due_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ), + invoice_date: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ), + item_id: T.nilable(String), + mark_as_paid: T::Boolean, + memo: T.nilable(String), + net_terms: T.nilable(Integer), + require_successful_payment: T::Boolean + } + ) + end + def to_hash + end + + # An optional custom due date for the invoice. If not set, the due date will be + # calculated based on the `net_terms` value. + module CustomDueDate + extend Orb::Internal::Type::Union + + Variants = T.type_alias { T.any(Date, Time) } + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::CustomDueDate::Variants + ] + ) + end + def self.variants + end + end + + # An ISO 8601 format date that denotes when this invoice should be dated in the + # customer's timezone. If not provided, the invoice date will default to the + # credit block's effective date. + module InvoiceDate + extend Orb::Internal::Type::Union + + Variants = T.type_alias { T.any(Date, Time) } + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::InvoiceDate::Variants + ] + ) + end + def self.variants + end + end end end - # Should prices that match the filter be included or excluded. - module Operator - extend Orb::Internal::Type::Enum - - TaggedSymbol = + class Decrement < Orb::Internal::Type::BaseModel + OrHash = T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, + Orb::Internal::AnyHash ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - INCLUDES = - T.let( - :includes, - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::TaggedSymbol - ) - EXCLUDES = - T.let( - :excludes, - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::TaggedSymbol - ) + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # User-specified key/value pairs for the resource. 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( + amount: Float, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + entry_type: :decrement + ) + end sig do override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::Operator::TaggedSymbol - ] + { + amount: Float, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) end - def self.values + def to_hash end end - end - class InvoiceSettings < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, - Orb::Internal::AnyHash - ) - end + class ExpirationChange < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, + Orb::Internal::AnyHash + ) + end - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - sig { returns(T::Boolean) } - attr_accessor :auto_collection + 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. + sig { returns(Date) } + attr_accessor :target_expiry_date + + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(T.nilable(Float)) } + attr_accessor :amount + + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + sig { returns(T.nilable(String)) } + attr_accessor :block_id + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # An ISO 8601 format date that identifies the origination credit block to expire + sig { returns(T.nilable(Time)) } + attr_accessor :expiry_date + + # User-specified key/value pairs for the resource. 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 - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::CustomDueDate::Variants - ) + sig do + params( + target_expiry_date: Date, + amount: T.nilable(Float), + block_id: T.nilable(String), + currency: T.nilable(String), + description: T.nilable(String), + expiry_date: T.nilable(Time), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).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. + target_expiry_date:, + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount: nil, + # The ID of the block affected by an expiration_change, used to differentiate + # between multiple blocks with the same `expiry_date`. + block_id: nil, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: nil, + # An ISO 8601 format date that identifies the origination credit block to expire + expiry_date: 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, + entry_type: :expiration_change ) - end - attr_accessor :custom_due_date + end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - sig do - returns( - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants + sig do + override.returns( + { + entry_type: Symbol, + target_expiry_date: Date, + amount: T.nilable(Float), + block_id: T.nilable(String), + currency: T.nilable(String), + description: T.nilable(String), + expiry_date: T.nilable(Time), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) - ) + end + def to_hash + end end - attr_accessor :invoice_date - - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - sig { returns(T.nilable(String)) } - attr_accessor :item_id - - # If true, the new credits purchase invoice will be marked as paid. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :mark_as_paid - - sig { params(mark_as_paid: T::Boolean).void } - attr_writer :mark_as_paid - - # An optional memo to display on the invoice. - sig { returns(T.nilable(String)) } - attr_accessor :memo - - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - sig { returns(T.nilable(Integer)) } - attr_accessor :net_terms - - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - sig { returns(T.nilable(T::Boolean)) } - attr_reader :require_successful_payment - - sig { params(require_successful_payment: T::Boolean).void } - attr_writer :require_successful_payment - - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - sig do - params( - auto_collection: T::Boolean, - custom_due_date: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::CustomDueDate::Variants - ), - invoice_date: + + class Void < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void, + Orb::Internal::AnyHash + ) + end + + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + sig { returns(Float) } + attr_accessor :amount + + # The ID of the block to void. + sig { returns(String) } + attr_accessor :block_id + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description + + # User-specified key/value pairs for the resource. 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 + + # Can only be specified when `entry_type=void`. The reason for the void. + sig do + returns( T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants - ), - item_id: T.nilable(String), - mark_as_paid: T::Boolean, - memo: T.nilable(String), - net_terms: T.nilable(Integer), - require_successful_payment: T::Boolean - ).returns(T.attached_class) - end - def self.new( - # Whether the credits purchase invoice should auto collect with the customer's - # saved payment method. - auto_collection:, - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - custom_due_date: nil, - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - invoice_date: nil, - # The ID of the Item to be used for the invoice line item. If not provided, a - # default 'Credits' item will be used. - item_id: nil, - # If true, the new credits purchase invoice will be marked as paid. - mark_as_paid: nil, - # An optional memo to display on the invoice. - memo: nil, - # The net terms determines the due date of the invoice. Due date is calculated - # based on the invoice or issuance date, depending on the account's configured due - # date calculation method. A value of '0' here represents that the invoice is due - # on issue, whereas a value of '30' represents that the customer has 30 days to - # pay the invoice. You must set either `net_terms` or `custom_due_date`, but not - # both. - net_terms: nil, - # If true, the new credit block will require that the corresponding invoice is - # paid before it can be drawn down from. - require_successful_payment: nil - ) - end + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason::OrSymbol + ) + ) + end + attr_accessor :void_reason - sig do - override.returns( - { - auto_collection: T::Boolean, - custom_due_date: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::CustomDueDate::Variants - ), - invoice_date: + sig do + params( + amount: Float, + block_id: String, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + void_reason: T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason::OrSymbol ), - item_id: T.nilable(String), - mark_as_paid: T::Boolean, - memo: T.nilable(String), - net_terms: T.nilable(Integer), - require_successful_payment: T::Boolean - } + entry_type: Symbol + ).returns(T.attached_class) + end + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement, void, or undo operations. + amount:, + # The ID of the block to void. + block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + # Can only be specified when `entry_type=void`. The reason for the void. + void_reason: nil, + entry_type: :void ) - end - def to_hash - end - - # An optional custom due date for the invoice. If not set, the due date will be - # calculated based on the `net_terms` value. - module CustomDueDate - extend Orb::Internal::Type::Union - - Variants = T.type_alias { T.any(Date, Time) } + end sig do override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::CustomDueDate::Variants - ] + { + amount: Float, + block_id: String, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + void_reason: + T.nilable( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason::OrSymbol + ) + } ) end - def self.variants + def to_hash + end + + # Can only be specified when `entry_type=void`. The reason for the void. + module VoidReason + extend Orb::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + REFUND = + T.let( + :refund, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::VoidReason::TaggedSymbol + ] + ) + end + def self.values + end end end - # An ISO 8601 format date that denotes when this invoice should be dated in the - # customer's timezone. If not provided, the invoice date will default to the - # credit block's effective date. - module InvoiceDate - extend Orb::Internal::Type::Union + class Amendment < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment, + Orb::Internal::AnyHash + ) + end + + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + sig { returns(Float) } + attr_accessor :amount + + # The ID of the block to reverse a decrement from. + sig { returns(String) } + attr_accessor :block_id + + sig { returns(Symbol) } + attr_accessor :entry_type + + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + sig { returns(T.nilable(String)) } + attr_accessor :currency + + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + sig { returns(T.nilable(String)) } + attr_accessor :description - Variants = T.type_alias { T.any(Date, Time) } + # User-specified key/value pairs for the resource. 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 - override.returns( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants - ] - ) + params( + amount: Float, + block_id: String, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), + entry_type: Symbol + ).returns(T.attached_class) end - def self.variants + def self.new( + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. + amount:, + # The ID of the block to reverse a decrement from. + block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. + currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. + description: 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, + entry_type: :amendment + ) end - end - end - - # Can only be specified when `entry_type=void`. The reason for the void. - module VoidReason - extend Orb::Internal::Type::Enum - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason + sig do + override.returns( + { + amount: Float, + block_id: String, + entry_type: Symbol, + currency: T.nilable(String), + description: T.nilable(String), + metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]) + } ) end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - REFUND = - T.let( - :refund, - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::TaggedSymbol - ) + def to_hash + end + end sig do override.returns( T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::TaggedSymbol + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Variants ] ) end - def self.values + def self.variants end end end diff --git a/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi b/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi index 6e4b9c606..82dd2dad1 100644 --- a/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + sig { returns(T.nilable(Time)) } attr_accessor :created_at_gt @@ -67,6 +70,7 @@ module Orb sig do params( + external_customer_id: String, created_at_gt: T.nilable(Time), created_at_gte: T.nilable(Time), created_at_lt: T.nilable(Time), @@ -87,6 +91,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_customer_id:, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, @@ -108,6 +113,7 @@ module Orb sig do override.returns( { + external_customer_id: String, created_at_gt: T.nilable(Time), created_at_gte: T.nilable(Time), created_at_lt: T.nilable(Time), diff --git a/rbi/orb/models/customers/credits/ledger_list_params.rbi b/rbi/orb/models/customers/credits/ledger_list_params.rbi index e685a5b35..3b2f0f484 100644 --- a/rbi/orb/models/customers/credits/ledger_list_params.rbi +++ b/rbi/orb/models/customers/credits/ledger_list_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + sig { returns(T.nilable(Time)) } attr_accessor :created_at_gt @@ -67,6 +70,7 @@ module Orb sig do params( + customer_id: String, created_at_gt: T.nilable(Time), created_at_gte: T.nilable(Time), created_at_lt: T.nilable(Time), @@ -87,6 +91,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, @@ -108,6 +113,7 @@ module Orb sig do override.returns( { + customer_id: String, created_at_gt: T.nilable(Time), created_at_gte: T.nilable(Time), created_at_lt: T.nilable(Time), diff --git a/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi b/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi index 254651b58..bdbc5b213 100644 --- a/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + # The amount to increment when the threshold is reached. sig { returns(String) } attr_accessor :amount @@ -72,6 +75,7 @@ module Orb sig do params( + external_customer_id: String, amount: String, currency: String, invoice_settings: @@ -88,6 +92,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_customer_id:, # The amount to increment when the threshold is reached. amount:, # The currency or custom pricing unit to use for this top-up. If this is a @@ -115,6 +120,7 @@ module Orb sig do override.returns( { + external_customer_id: String, amount: String, currency: String, invoice_settings: diff --git a/rbi/orb/models/customers/credits/top_up_create_params.rbi b/rbi/orb/models/customers/credits/top_up_create_params.rbi index 60b781c92..20904633c 100644 --- a/rbi/orb/models/customers/credits/top_up_create_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_create_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + # The amount to increment when the threshold is reached. sig { returns(String) } attr_accessor :amount @@ -70,6 +73,7 @@ module Orb sig do params( + customer_id: String, amount: String, currency: String, invoice_settings: @@ -86,6 +90,7 @@ module Orb ).returns(T.attached_class) end def self.new( + customer_id:, # The amount to increment when the threshold is reached. amount:, # The currency or custom pricing unit to use for this top-up. If this is a @@ -113,6 +118,7 @@ module Orb sig do override.returns( { + customer_id: String, amount: String, currency: String, invoice_settings: diff --git a/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi b/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi index 679f6a17b..68e56ce40 100644 --- a/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi @@ -19,19 +19,24 @@ module Orb sig { returns(String) } attr_accessor :external_customer_id + sig { returns(String) } + attr_accessor :top_up_id + sig do params( external_customer_id: String, + top_up_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(external_customer_id:, request_options: {}) + def self.new(external_customer_id:, top_up_id:, request_options: {}) end sig do override.returns( { external_customer_id: String, + top_up_id: String, request_options: Orb::RequestOptions } ) diff --git a/rbi/orb/models/customers/credits/top_up_delete_params.rbi b/rbi/orb/models/customers/credits/top_up_delete_params.rbi index ee0e58fd4..412c15c80 100644 --- a/rbi/orb/models/customers/credits/top_up_delete_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_delete_params.rbi @@ -19,18 +19,26 @@ module Orb sig { returns(String) } attr_accessor :customer_id + sig { returns(String) } + attr_accessor :top_up_id + sig do params( customer_id: String, + top_up_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(customer_id:, request_options: {}) + def self.new(customer_id:, top_up_id:, request_options: {}) end sig do override.returns( - { customer_id: String, request_options: Orb::RequestOptions } + { + customer_id: String, + top_up_id: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi b/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi index 09ff5dd9e..ba9a7658f 100644 --- a/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_customer_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -30,12 +33,14 @@ module Orb sig do params( + external_customer_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + external_customer_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -48,6 +53,7 @@ module Orb sig do override.returns( { + external_customer_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions diff --git a/rbi/orb/models/customers/credits/top_up_list_params.rbi b/rbi/orb/models/customers/credits/top_up_list_params.rbi index 4f8271517..6a84cc741 100644 --- a/rbi/orb/models/customers/credits/top_up_list_params.rbi +++ b/rbi/orb/models/customers/credits/top_up_list_params.rbi @@ -16,6 +16,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :customer_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -30,12 +33,14 @@ module Orb sig do params( + customer_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + customer_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -48,6 +53,7 @@ module Orb sig do override.returns( { + customer_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions diff --git a/rbi/orb/models/dimensional_price_group_retrieve_params.rbi b/rbi/orb/models/dimensional_price_group_retrieve_params.rbi index 05105f88e..17bb76d95 100644 --- a/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +++ b/rbi/orb/models/dimensional_price_group_retrieve_params.rbi @@ -14,15 +14,26 @@ module Orb ) end + sig { returns(String) } + attr_accessor :dimensional_price_group_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + dimensional_price_group_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(dimensional_price_group_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { + dimensional_price_group_id: String, + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/orb/models/dimensional_price_group_update_params.rbi b/rbi/orb/models/dimensional_price_group_update_params.rbi index c486b9511..084560f6a 100644 --- a/rbi/orb/models/dimensional_price_group_update_params.rbi +++ b/rbi/orb/models/dimensional_price_group_update_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::DimensionalPriceGroupUpdateParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :dimensional_price_group_id + # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this # field to identify a dimensional price group by an existing identifier in your @@ -26,12 +29,14 @@ module Orb sig do params( + dimensional_price_group_id: String, external_dimensional_price_group_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + dimensional_price_group_id:, # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this # field to identify a dimensional price group by an existing identifier in your @@ -48,6 +53,7 @@ module Orb sig do override.returns( { + dimensional_price_group_id: String, external_dimensional_price_group_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi b/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi index fcdfea852..3e481a366 100644 --- a/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +++ b/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi @@ -15,15 +15,26 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_dimensional_price_group_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + external_dimensional_price_group_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(external_dimensional_price_group_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { + external_dimensional_price_group_id: String, + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi b/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi index e9b7b1501..c6111fcae 100644 --- a/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +++ b/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :path_external_dimensional_price_group_id + # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this # field to identify a dimensional price group by an existing identifier in your @@ -30,12 +33,14 @@ module Orb sig do params( + path_external_dimensional_price_group_id: String, body_external_dimensional_price_group_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + path_external_dimensional_price_group_id:, # An optional user-defined ID for this dimensional price group resource, used # throughout the system as an alias for this dimensional price group. Use this # field to identify a dimensional price group by an existing identifier in your @@ -52,6 +57,7 @@ module Orb sig do override.returns( { + path_external_dimensional_price_group_id: String, body_external_dimensional_price_group_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/event_deprecate_params.rbi b/rbi/orb/models/event_deprecate_params.rbi index 62690a55e..50ca15d2d 100644 --- a/rbi/orb/models/event_deprecate_params.rbi +++ b/rbi/orb/models/event_deprecate_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::EventDeprecateParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :event_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + event_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(event_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { event_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/event_update_params.rbi b/rbi/orb/models/event_update_params.rbi index ad0ff6398..c69abb737 100644 --- a/rbi/orb/models/event_update_params.rbi +++ b/rbi/orb/models/event_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::EventUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :event_id + # A name to meaningfully identify the action or event type. sig { returns(String) } attr_accessor :event_name @@ -35,6 +38,7 @@ module Orb sig do params( + event_id: String, event_name: String, properties: T::Hash[Symbol, T.anything], timestamp: Time, @@ -44,6 +48,7 @@ module Orb ).returns(T.attached_class) end def self.new( + event_id:, # A name to meaningfully identify the action or event type. event_name:, # A dictionary of custom properties. Values in this dictionary must be numeric, @@ -65,6 +70,7 @@ module Orb sig do override.returns( { + event_id: String, event_name: String, properties: T::Hash[Symbol, T.anything], timestamp: Time, diff --git a/rbi/orb/models/events/backfill_close_params.rbi b/rbi/orb/models/events/backfill_close_params.rbi index 5aa6bacd8..f1c793941 100644 --- a/rbi/orb/models/events/backfill_close_params.rbi +++ b/rbi/orb/models/events/backfill_close_params.rbi @@ -12,15 +12,23 @@ module Orb T.any(Orb::Events::BackfillCloseParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :backfill_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + backfill_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(backfill_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { backfill_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/events/backfill_fetch_params.rbi b/rbi/orb/models/events/backfill_fetch_params.rbi index 8feee6cf7..d3b04db99 100644 --- a/rbi/orb/models/events/backfill_fetch_params.rbi +++ b/rbi/orb/models/events/backfill_fetch_params.rbi @@ -12,15 +12,23 @@ module Orb T.any(Orb::Events::BackfillFetchParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :backfill_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + backfill_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(backfill_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { backfill_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/events/backfill_revert_params.rbi b/rbi/orb/models/events/backfill_revert_params.rbi index 05e797f7b..7915adde6 100644 --- a/rbi/orb/models/events/backfill_revert_params.rbi +++ b/rbi/orb/models/events/backfill_revert_params.rbi @@ -12,15 +12,23 @@ module Orb T.any(Orb::Events::BackfillRevertParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :backfill_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + backfill_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(backfill_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { backfill_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/invoice_delete_line_item_params.rbi b/rbi/orb/models/invoice_delete_line_item_params.rbi index f11deb3ca..9d43d1c14 100644 --- a/rbi/orb/models/invoice_delete_line_item_params.rbi +++ b/rbi/orb/models/invoice_delete_line_item_params.rbi @@ -14,18 +14,26 @@ module Orb sig { returns(String) } attr_accessor :invoice_id + sig { returns(String) } + attr_accessor :line_item_id + sig do params( invoice_id: String, + line_item_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(invoice_id:, request_options: {}) + def self.new(invoice_id:, line_item_id:, request_options: {}) end sig do override.returns( - { invoice_id: String, request_options: Orb::RequestOptions } + { + invoice_id: String, + line_item_id: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/invoice_fetch_params.rbi b/rbi/orb/models/invoice_fetch_params.rbi index 8e393eac7..1fd1f81f5 100644 --- a/rbi/orb/models/invoice_fetch_params.rbi +++ b/rbi/orb/models/invoice_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::InvoiceFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :invoice_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + invoice_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(invoice_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { invoice_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/invoice_issue_params.rbi b/rbi/orb/models/invoice_issue_params.rbi index 893e7418c..093a5b5e6 100644 --- a/rbi/orb/models/invoice_issue_params.rbi +++ b/rbi/orb/models/invoice_issue_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::InvoiceIssueParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :invoice_id + # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices # that have no usage fees. If the invoice is configured to sync to an external @@ -22,11 +25,13 @@ module Orb sig do params( + invoice_id: String, synchronous: T::Boolean, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + invoice_id:, # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices # that have no usage fees. If the invoice is configured to sync to an external @@ -39,7 +44,11 @@ module Orb sig do override.returns( - { synchronous: T::Boolean, request_options: Orb::RequestOptions } + { + invoice_id: String, + synchronous: T::Boolean, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/invoice_issue_summary_params.rbi b/rbi/orb/models/invoice_issue_summary_params.rbi index 165a7b5fd..9b7139f20 100644 --- a/rbi/orb/models/invoice_issue_summary_params.rbi +++ b/rbi/orb/models/invoice_issue_summary_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::InvoiceIssueSummaryParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :invoice_id + # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices # that have no usage fees. If the invoice is configured to sync to an external @@ -24,11 +27,13 @@ module Orb sig do params( + invoice_id: String, synchronous: T::Boolean, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + invoice_id:, # If true, the invoice will be issued synchronously. If false, the invoice will be # issued asynchronously. The synchronous option is only available for invoices # that have no usage fees. If the invoice is configured to sync to an external @@ -41,7 +46,11 @@ module Orb sig do override.returns( - { synchronous: T::Boolean, request_options: Orb::RequestOptions } + { + invoice_id: String, + synchronous: T::Boolean, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/invoice_mark_paid_params.rbi b/rbi/orb/models/invoice_mark_paid_params.rbi index 6a45b01a0..d76f67174 100644 --- a/rbi/orb/models/invoice_mark_paid_params.rbi +++ b/rbi/orb/models/invoice_mark_paid_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::InvoiceMarkPaidParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :invoice_id + # A date string to specify the date of the payment. sig { returns(Date) } attr_accessor :payment_received_date @@ -25,6 +28,7 @@ module Orb sig do params( + invoice_id: String, payment_received_date: Date, external_id: T.nilable(String), notes: T.nilable(String), @@ -32,6 +36,7 @@ module Orb ).returns(T.attached_class) end def self.new( + invoice_id:, # A date string to specify the date of the payment. payment_received_date:, # An optional external ID to associate with the payment. @@ -45,6 +50,7 @@ module Orb sig do override.returns( { + invoice_id: String, payment_received_date: Date, external_id: T.nilable(String), notes: T.nilable(String), diff --git a/rbi/orb/models/invoice_pay_params.rbi b/rbi/orb/models/invoice_pay_params.rbi index 756fbfb36..71dc8c9ab 100644 --- a/rbi/orb/models/invoice_pay_params.rbi +++ b/rbi/orb/models/invoice_pay_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::InvoicePayParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :invoice_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + invoice_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(invoice_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { invoice_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/invoice_update_params.rbi b/rbi/orb/models/invoice_update_params.rbi index 2eb4abe9a..f45217d9c 100644 --- a/rbi/orb/models/invoice_update_params.rbi +++ b/rbi/orb/models/invoice_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::InvoiceUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :invoice_id + # Determines whether this invoice will automatically attempt to charge a saved # payment method, if any. Can only be modified on draft invoices. If not # specified, the invoice's existing setting is unchanged. @@ -42,6 +45,7 @@ module Orb sig do params( + invoice_id: String, auto_collection: T.nilable(T::Boolean), due_date: T.nilable(Orb::InvoiceUpdateParams::DueDate::Variants), invoice_date: @@ -52,6 +56,7 @@ module Orb ).returns(T.attached_class) end def self.new( + invoice_id:, # Determines whether this invoice will automatically attempt to charge a saved # payment method, if any. Can only be modified on draft invoices. If not # specified, the invoice's existing setting is unchanged. @@ -78,6 +83,7 @@ module Orb sig do override.returns( { + invoice_id: String, auto_collection: T.nilable(T::Boolean), due_date: T.nilable(Orb::InvoiceUpdateParams::DueDate::Variants), invoice_date: diff --git a/rbi/orb/models/invoice_void_params.rbi b/rbi/orb/models/invoice_void_params.rbi index ee6fa4a66..1d3775960 100644 --- a/rbi/orb/models/invoice_void_params.rbi +++ b/rbi/orb/models/invoice_void_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::InvoiceVoidParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :invoice_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + invoice_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(invoice_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { invoice_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/item_archive_params.rbi b/rbi/orb/models/item_archive_params.rbi index 41626ea2c..1d4dc1f2f 100644 --- a/rbi/orb/models/item_archive_params.rbi +++ b/rbi/orb/models/item_archive_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::ItemArchiveParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :item_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + item_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(item_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { item_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/item_fetch_params.rbi b/rbi/orb/models/item_fetch_params.rbi index d92bf33f1..fef8003e8 100644 --- a/rbi/orb/models/item_fetch_params.rbi +++ b/rbi/orb/models/item_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::ItemFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :item_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + item_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(item_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { item_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/item_update_params.rbi b/rbi/orb/models/item_update_params.rbi index 355234c3c..5f599d250 100644 --- a/rbi/orb/models/item_update_params.rbi +++ b/rbi/orb/models/item_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::ItemUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :item_id + sig do returns(T.nilable(T::Array[Orb::ItemUpdateParams::ExternalConnection])) end @@ -25,6 +28,7 @@ module Orb sig do params( + item_id: String, external_connections: T.nilable( T::Array[Orb::ItemUpdateParams::ExternalConnection::OrHash] @@ -35,6 +39,7 @@ module Orb ).returns(T.attached_class) end def self.new( + item_id:, external_connections: 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 @@ -48,6 +53,7 @@ module Orb sig do override.returns( { + item_id: String, external_connections: T.nilable(T::Array[Orb::ItemUpdateParams::ExternalConnection]), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), diff --git a/rbi/orb/models/license_deactivate_params.rbi b/rbi/orb/models/license_deactivate_params.rbi index 7b187ddf7..94e47ebf0 100644 --- a/rbi/orb/models/license_deactivate_params.rbi +++ b/rbi/orb/models/license_deactivate_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::LicenseDeactivateParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :license_id + # The date to deactivate the license. If not provided, defaults to end of day # today in the customer's timezone. sig { returns(T.nilable(Date)) } @@ -18,11 +21,13 @@ module Orb sig do params( + license_id: String, end_date: T.nilable(Date), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + license_id:, # The date to deactivate the license. If not provided, defaults to end of day # today in the customer's timezone. end_date: nil, @@ -32,7 +37,11 @@ module Orb sig do override.returns( - { end_date: T.nilable(Date), request_options: Orb::RequestOptions } + { + license_id: String, + end_date: T.nilable(Date), + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/license_retrieve_by_external_id_params.rbi b/rbi/orb/models/license_retrieve_by_external_id_params.rbi index 2e2555160..16fc26e1d 100644 --- a/rbi/orb/models/license_retrieve_by_external_id_params.rbi +++ b/rbi/orb/models/license_retrieve_by_external_id_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::LicenseRetrieveByExternalIDParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :external_license_id + # The ID of the license type to fetch the license for. sig { returns(String) } attr_accessor :license_type_id @@ -21,12 +24,14 @@ module Orb sig do params( + external_license_id: String, license_type_id: String, subscription_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + external_license_id:, # The ID of the license type to fetch the license for. license_type_id:, # The ID of the subscription to fetch the license for. @@ -38,6 +43,7 @@ module Orb sig do override.returns( { + external_license_id: String, license_type_id: String, subscription_id: String, request_options: Orb::RequestOptions diff --git a/rbi/orb/models/license_retrieve_params.rbi b/rbi/orb/models/license_retrieve_params.rbi index b03382343..b9dbca5bb 100644 --- a/rbi/orb/models/license_retrieve_params.rbi +++ b/rbi/orb/models/license_retrieve_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::LicenseRetrieveParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :license_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + license_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(license_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { license_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/license_type_retrieve_params.rbi b/rbi/orb/models/license_type_retrieve_params.rbi index 56eac2977..f86e476ab 100644 --- a/rbi/orb/models/license_type_retrieve_params.rbi +++ b/rbi/orb/models/license_type_retrieve_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::LicenseTypeRetrieveParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :license_type_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + license_type_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(license_type_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { license_type_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/licenses/external_license_get_usage_params.rbi b/rbi/orb/models/licenses/external_license_get_usage_params.rbi index 48a64379e..2c347257c 100644 --- a/rbi/orb/models/licenses/external_license_get_usage_params.rbi +++ b/rbi/orb/models/licenses/external_license_get_usage_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_license_id + # The license type ID to filter licenses by. sig { returns(String) } attr_accessor :license_type_id @@ -51,6 +54,7 @@ module Orb sig do params( + external_license_id: String, license_type_id: String, subscription_id: String, cursor: T.nilable(String), @@ -62,6 +66,7 @@ module Orb ).returns(T.attached_class) end def self.new( + external_license_id:, # The license type ID to filter licenses by. license_type_id:, # The subscription ID to get license usage for. @@ -86,6 +91,7 @@ module Orb sig do override.returns( { + external_license_id: String, license_type_id: String, subscription_id: String, cursor: T.nilable(String), diff --git a/rbi/orb/models/licenses/usage_get_usage_params.rbi b/rbi/orb/models/licenses/usage_get_usage_params.rbi index 194e878b0..eaa0e9007 100644 --- a/rbi/orb/models/licenses/usage_get_usage_params.rbi +++ b/rbi/orb/models/licenses/usage_get_usage_params.rbi @@ -12,6 +12,9 @@ module Orb T.any(Orb::Licenses::UsageGetUsageParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :license_id + # Pagination cursor from a previous request. sig { returns(T.nilable(String)) } attr_accessor :cursor @@ -40,6 +43,7 @@ module Orb sig do params( + license_id: String, cursor: T.nilable(String), end_date: T.nilable(Date), group_by: T.nilable(T::Array[String]), @@ -49,6 +53,7 @@ module Orb ).returns(T.attached_class) end def self.new( + license_id:, # Pagination cursor from a previous request. cursor: nil, # End date for the usage period (YYYY-MM-DD). Defaults to end of current billing @@ -69,6 +74,7 @@ module Orb sig do override.returns( { + license_id: String, cursor: T.nilable(String), end_date: T.nilable(Date), group_by: T.nilable(T::Array[String]), diff --git a/rbi/orb/models/metric_fetch_params.rbi b/rbi/orb/models/metric_fetch_params.rbi index f26d49aba..c64950f8b 100644 --- a/rbi/orb/models/metric_fetch_params.rbi +++ b/rbi/orb/models/metric_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::MetricFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :metric_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + metric_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(metric_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { metric_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/metric_update_params.rbi b/rbi/orb/models/metric_update_params.rbi index 72eaecd6a..9027e01db 100644 --- a/rbi/orb/models/metric_update_params.rbi +++ b/rbi/orb/models/metric_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::MetricUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :metric_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`. @@ -17,11 +20,13 @@ module Orb sig do params( + metric_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + metric_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`. @@ -33,6 +38,7 @@ module Orb sig do override.returns( { + metric_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions } diff --git a/rbi/orb/models/plan_create_params.rbi b/rbi/orb/models/plan_create_params.rbi index c8ce77a40..52adeeed8 100644 --- a/rbi/orb/models/plan_create_params.rbi +++ b/rbi/orb/models/plan_create_params.rbi @@ -145,6 +145,48 @@ module Orb end attr_writer :allocation_price + # 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 + ) + ) + ) + end + attr_accessor :license_allocation_price + # The phase to add this price to. sig { returns(T.nilable(Integer)) } attr_accessor :plan_phase_order @@ -194,6 +236,42 @@ module Orb sig do params( 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -236,6 +314,8 @@ module Orb def self.new( # 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 add this price to. plan_phase_order: nil, # New plan price request body params. @@ -247,6 +327,42 @@ module Orb override.returns( { 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 + ) + ), plan_phase_order: T.nilable(Integer), price: T.nilable( @@ -290,6 +406,14508 @@ module Orb 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::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 + ) + end + + class Unit < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Unit, + Orb::Internal::AnyHash + ) + end + + # The cadence to bill for this price on. + sig do + returns( + Orb::PlanCreateParams::Price::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::PlanCreateParams::Price::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::PlanCreateParams::Price::LicenseAllocationPrice::Unit::Cadence::OrSymbol, + item_id: String, + license_allocations: + T::Array[ + Orb::PlanCreateParams::Price::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::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) + } + ) + 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 + end + end + + class Tiered < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PlanCreateParams::Price::LicenseAllocationPrice::Tiered, + 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. + 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 + + # 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::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 + 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. module Price extend Orb::Internal::Type::Union diff --git a/rbi/orb/models/plan_fetch_params.rbi b/rbi/orb/models/plan_fetch_params.rbi index 66aa7f53b..b33d9e1d0 100644 --- a/rbi/orb/models/plan_fetch_params.rbi +++ b/rbi/orb/models/plan_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::PlanFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :plan_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + plan_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(plan_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { plan_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/plan_update_params.rbi b/rbi/orb/models/plan_update_params.rbi index 8c633588d..cb9b71e5b 100644 --- a/rbi/orb/models/plan_update_params.rbi +++ b/rbi/orb/models/plan_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::PlanUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :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 # identifier in your system. @@ -23,12 +26,14 @@ module Orb sig do params( + plan_id: String, external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + 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 # identifier in your system. @@ -44,6 +49,7 @@ module Orb sig do override.returns( { + plan_id: 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_fetch_params.rbi b/rbi/orb/models/plans/external_plan_id_fetch_params.rbi index 0f7026410..3127c83a5 100644 --- a/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +++ b/rbi/orb/models/plans/external_plan_id_fetch_params.rbi @@ -12,15 +12,23 @@ module Orb T.any(Orb::Plans::ExternalPlanIDFetchParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :external_plan_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + external_plan_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(external_plan_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { external_plan_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end 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 786c78ab6..5e661cb87 100644 --- a/rbi/orb/models/plans/external_plan_id_update_params.rbi +++ b/rbi/orb/models/plans/external_plan_id_update_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :other_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 # identifier in your system. @@ -29,12 +32,14 @@ module Orb sig do params( + other_external_plan_id: String, external_plan_id: T.nilable(String), metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + other_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 # identifier in your system. @@ -50,6 +55,7 @@ module Orb sig do override.returns( { + other_external_plan_id: 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/migration_cancel_params.rbi b/rbi/orb/models/plans/migration_cancel_params.rbi index 7c56f5fc9..5accfedb5 100644 --- a/rbi/orb/models/plans/migration_cancel_params.rbi +++ b/rbi/orb/models/plans/migration_cancel_params.rbi @@ -15,18 +15,26 @@ module Orb sig { returns(String) } attr_accessor :plan_id + sig { returns(String) } + attr_accessor :migration_id + sig do params( plan_id: String, + migration_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(plan_id:, request_options: {}) + def self.new(plan_id:, migration_id:, request_options: {}) end sig do override.returns( - { plan_id: String, request_options: Orb::RequestOptions } + { + plan_id: String, + migration_id: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/plans/migration_list_params.rbi b/rbi/orb/models/plans/migration_list_params.rbi index e6a2b3f2f..f27390088 100644 --- a/rbi/orb/models/plans/migration_list_params.rbi +++ b/rbi/orb/models/plans/migration_list_params.rbi @@ -12,6 +12,9 @@ module Orb T.any(Orb::Plans::MigrationListParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :plan_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -26,12 +29,14 @@ module Orb sig do params( + plan_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + plan_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -44,6 +49,7 @@ module Orb sig do override.returns( { + plan_id: String, cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions diff --git a/rbi/orb/models/plans/migration_retrieve_params.rbi b/rbi/orb/models/plans/migration_retrieve_params.rbi index 6c9f41bf1..757132404 100644 --- a/rbi/orb/models/plans/migration_retrieve_params.rbi +++ b/rbi/orb/models/plans/migration_retrieve_params.rbi @@ -15,18 +15,26 @@ module Orb sig { returns(String) } attr_accessor :plan_id + sig { returns(String) } + attr_accessor :migration_id + sig do params( plan_id: String, + migration_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end - def self.new(plan_id:, request_options: {}) + def self.new(plan_id:, migration_id:, request_options: {}) end sig do override.returns( - { plan_id: String, request_options: Orb::RequestOptions } + { + plan_id: String, + migration_id: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/price_create_params.rbi b/rbi/orb/models/price_create_params.rbi index 4a99d81b0..3c986f288 100644 --- a/rbi/orb/models/price_create_params.rbi +++ b/rbi/orb/models/price_create_params.rbi @@ -9,2891 +9,2079 @@ module Orb OrHash = T.type_alias { T.any(Orb::PriceCreateParams, Orb::Internal::AnyHash) } - # The cadence to bill for this price on. - sig { returns(Orb::PriceCreateParams::Cadence::OrSymbol) } - 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 - - # The pricing model type - sig { returns(Orb::PriceCreateParams::ModelType::OrSymbol) } - 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 - - # 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 - - # Configuration for tiered pricing - sig { returns(Orb::TieredConfig) } - attr_reader :tiered_config - - sig { params(tiered_config: Orb::TieredConfig::OrHash).void } - attr_writer :tiered_config - - # Configuration for bulk pricing - sig { returns(Orb::BulkConfig) } - attr_reader :bulk_config - - sig { params(bulk_config: Orb::BulkConfig::OrHash).void } - attr_writer :bulk_config - - # Configuration for bulk_with_filters pricing - sig { returns(Orb::PriceCreateParams::BulkWithFiltersConfig) } - attr_reader :bulk_with_filters_config - - sig do - params( - bulk_with_filters_config: - Orb::PriceCreateParams::BulkWithFiltersConfig::OrHash - ).void - end - attr_writer :bulk_with_filters_config - - # Configuration for package pricing - sig { returns(Orb::PackageConfig) } - attr_reader :package_config - - sig { params(package_config: Orb::PackageConfig::OrHash).void } - attr_writer :package_config - - # Configuration for matrix pricing - sig { returns(Orb::MatrixConfig) } - attr_reader :matrix_config - - sig { params(matrix_config: Orb::MatrixConfig::OrHash).void } - attr_writer :matrix_config - - # Configuration for threshold_total_amount pricing - sig { returns(Orb::PriceCreateParams::ThresholdTotalAmountConfig) } - attr_reader :threshold_total_amount_config - - sig do - params( - threshold_total_amount_config: - Orb::PriceCreateParams::ThresholdTotalAmountConfig::OrHash - ).void - end - attr_writer :threshold_total_amount_config - - # Configuration for tiered_package pricing - sig { returns(Orb::PriceCreateParams::TieredPackageConfig) } - attr_reader :tiered_package_config - - sig do - params( - tiered_package_config: - Orb::PriceCreateParams::TieredPackageConfig::OrHash - ).void - end - attr_writer :tiered_package_config - - # Configuration for tiered_with_minimum pricing - sig { returns(Orb::PriceCreateParams::TieredWithMinimumConfig) } - attr_reader :tiered_with_minimum_config - - sig do - params( - tiered_with_minimum_config: - Orb::PriceCreateParams::TieredWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_with_minimum_config - - # Configuration for grouped_tiered pricing - sig { returns(Orb::PriceCreateParams::GroupedTieredConfig) } - attr_reader :grouped_tiered_config - - sig do - params( - grouped_tiered_config: - Orb::PriceCreateParams::GroupedTieredConfig::OrHash - ).void - end - attr_writer :grouped_tiered_config - - # Configuration for tiered_package_with_minimum pricing - sig { returns(Orb::PriceCreateParams::TieredPackageWithMinimumConfig) } - attr_reader :tiered_package_with_minimum_config - - sig do - params( - tiered_package_with_minimum_config: - Orb::PriceCreateParams::TieredPackageWithMinimumConfig::OrHash - ).void - end - attr_writer :tiered_package_with_minimum_config - - # Configuration for package_with_allocation pricing - sig { returns(Orb::PriceCreateParams::PackageWithAllocationConfig) } - attr_reader :package_with_allocation_config - - sig do - params( - package_with_allocation_config: - Orb::PriceCreateParams::PackageWithAllocationConfig::OrHash - ).void - end - attr_writer :package_with_allocation_config - - # Configuration for unit_with_percent pricing - sig { returns(Orb::PriceCreateParams::UnitWithPercentConfig) } - attr_reader :unit_with_percent_config - - sig do - params( - unit_with_percent_config: - Orb::PriceCreateParams::UnitWithPercentConfig::OrHash - ).void - end - attr_writer :unit_with_percent_config - - # 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 - - # Configuration for tiered_with_proration pricing - sig { returns(Orb::PriceCreateParams::TieredWithProrationConfig) } - attr_reader :tiered_with_proration_config - - sig do - params( - tiered_with_proration_config: - Orb::PriceCreateParams::TieredWithProrationConfig::OrHash - ).void - end - attr_writer :tiered_with_proration_config - - # Configuration for unit_with_proration pricing - sig { returns(Orb::PriceCreateParams::UnitWithProrationConfig) } - attr_reader :unit_with_proration_config - - sig do - params( - unit_with_proration_config: - Orb::PriceCreateParams::UnitWithProrationConfig::OrHash - ).void - end - attr_writer :unit_with_proration_config - - # Configuration for grouped_allocation pricing - sig { returns(Orb::PriceCreateParams::GroupedAllocationConfig) } - attr_reader :grouped_allocation_config - - sig do - params( - grouped_allocation_config: - Orb::PriceCreateParams::GroupedAllocationConfig::OrHash - ).void - end - attr_writer :grouped_allocation_config - - # Configuration for bulk_with_proration pricing - sig { returns(Orb::PriceCreateParams::BulkWithProrationConfig) } - attr_reader :bulk_with_proration_config - - sig do - params( - bulk_with_proration_config: - Orb::PriceCreateParams::BulkWithProrationConfig::OrHash - ).void - end - attr_writer :bulk_with_proration_config - - # Configuration for grouped_with_prorated_minimum pricing - sig { returns(Orb::PriceCreateParams::GroupedWithProratedMinimumConfig) } - attr_reader :grouped_with_prorated_minimum_config - - sig do - params( - grouped_with_prorated_minimum_config: - Orb::PriceCreateParams::GroupedWithProratedMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_prorated_minimum_config - - # Configuration for grouped_with_metered_minimum pricing - sig { returns(Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig) } - attr_reader :grouped_with_metered_minimum_config - - sig do - params( - grouped_with_metered_minimum_config: - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::OrHash - ).void - end - attr_writer :grouped_with_metered_minimum_config - - # Configuration for grouped_with_min_max_thresholds pricing - sig { returns(Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig) } - attr_reader :grouped_with_min_max_thresholds_config - - sig do - params( - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig::OrHash - ).void - end - attr_writer :grouped_with_min_max_thresholds_config - - # Configuration for matrix_with_display_name pricing - sig { returns(Orb::PriceCreateParams::MatrixWithDisplayNameConfig) } - attr_reader :matrix_with_display_name_config - - sig do - params( - matrix_with_display_name_config: - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::OrHash - ).void - end - attr_writer :matrix_with_display_name_config - - # Configuration for grouped_tiered_package pricing - sig { returns(Orb::PriceCreateParams::GroupedTieredPackageConfig) } - attr_reader :grouped_tiered_package_config - - sig do - params( - grouped_tiered_package_config: - Orb::PriceCreateParams::GroupedTieredPackageConfig::OrHash - ).void - end - attr_writer :grouped_tiered_package_config - - # Configuration for max_group_tiered_package pricing - sig { returns(Orb::PriceCreateParams::MaxGroupTieredPackageConfig) } - attr_reader :max_group_tiered_package_config - - sig do - params( - max_group_tiered_package_config: - Orb::PriceCreateParams::MaxGroupTieredPackageConfig::OrHash - ).void - end - attr_writer :max_group_tiered_package_config - - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - returns(Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig) - end - attr_reader :scalable_matrix_with_unit_pricing_config - - sig do - params( - scalable_matrix_with_unit_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_unit_pricing_config - - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - returns(Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig) - end - attr_reader :scalable_matrix_with_tiered_pricing_config - - sig do - params( - scalable_matrix_with_tiered_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::OrHash - ).void - end - attr_writer :scalable_matrix_with_tiered_pricing_config - - # Configuration for cumulative_grouped_bulk pricing - sig { returns(Orb::PriceCreateParams::CumulativeGroupedBulkConfig) } - attr_reader :cumulative_grouped_bulk_config - - sig do - params( - cumulative_grouped_bulk_config: - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_bulk_config - - # Configuration for cumulative_grouped_allocation pricing - sig { returns(Orb::PriceCreateParams::CumulativeGroupedAllocationConfig) } - attr_reader :cumulative_grouped_allocation_config - - sig do - params( - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::CumulativeGroupedAllocationConfig::OrHash - ).void - end - attr_writer :cumulative_grouped_allocation_config - - # Configuration for minimum_composite pricing - sig { returns(Orb::PriceCreateParams::MinimumCompositeConfig) } - attr_reader :minimum_composite_config - - sig do - params( - minimum_composite_config: - Orb::PriceCreateParams::MinimumCompositeConfig::OrHash - ).void - end - attr_writer :minimum_composite_config - - # Configuration for percent pricing - sig { returns(Orb::PriceCreateParams::PercentConfig) } - attr_reader :percent_config - - sig do - params( - percent_config: Orb::PriceCreateParams::PercentConfig::OrHash - ).void - end - attr_writer :percent_config - - # Configuration for event_output pricing - sig { returns(Orb::PriceCreateParams::EventOutputConfig) } - attr_reader :event_output_config - - sig do - params( - event_output_config: Orb::PriceCreateParams::EventOutputConfig::OrHash - ).void - end - attr_writer :event_output_config - - sig do - params( - cadence: Orb::PriceCreateParams::Cadence::OrSymbol, - currency: String, - item_id: String, - model_type: Orb::PriceCreateParams::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - tiered_config: Orb::TieredConfig::OrHash, - bulk_config: Orb::BulkConfig::OrHash, - bulk_with_filters_config: - Orb::PriceCreateParams::BulkWithFiltersConfig::OrHash, - package_config: Orb::PackageConfig::OrHash, - matrix_config: Orb::MatrixConfig::OrHash, - threshold_total_amount_config: - Orb::PriceCreateParams::ThresholdTotalAmountConfig::OrHash, - tiered_package_config: - Orb::PriceCreateParams::TieredPackageConfig::OrHash, - tiered_with_minimum_config: - Orb::PriceCreateParams::TieredWithMinimumConfig::OrHash, - grouped_tiered_config: - Orb::PriceCreateParams::GroupedTieredConfig::OrHash, - tiered_package_with_minimum_config: - Orb::PriceCreateParams::TieredPackageWithMinimumConfig::OrHash, - package_with_allocation_config: - Orb::PriceCreateParams::PackageWithAllocationConfig::OrHash, - unit_with_percent_config: - Orb::PriceCreateParams::UnitWithPercentConfig::OrHash, - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - tiered_with_proration_config: - Orb::PriceCreateParams::TieredWithProrationConfig::OrHash, - unit_with_proration_config: - Orb::PriceCreateParams::UnitWithProrationConfig::OrHash, - grouped_allocation_config: - Orb::PriceCreateParams::GroupedAllocationConfig::OrHash, - bulk_with_proration_config: - Orb::PriceCreateParams::BulkWithProrationConfig::OrHash, - grouped_with_prorated_minimum_config: - Orb::PriceCreateParams::GroupedWithProratedMinimumConfig::OrHash, - grouped_with_metered_minimum_config: - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::OrHash, - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig::OrHash, - matrix_with_display_name_config: - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::OrHash, - grouped_tiered_package_config: - Orb::PriceCreateParams::GroupedTieredPackageConfig::OrHash, - max_group_tiered_package_config: - Orb::PriceCreateParams::MaxGroupTieredPackageConfig::OrHash, - scalable_matrix_with_unit_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::OrHash, - scalable_matrix_with_tiered_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::OrHash, - cumulative_grouped_bulk_config: - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::OrHash, - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::CumulativeGroupedAllocationConfig::OrHash, - minimum_composite_config: - Orb::PriceCreateParams::MinimumCompositeConfig::OrHash, - percent_config: Orb::PriceCreateParams::PercentConfig::OrHash, - event_output_config: - Orb::PriceCreateParams::EventOutputConfig::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 - ) - ), - 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)]), - request_options: Orb::RequestOptions::OrHash - ).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:, - # The pricing model type - model_type:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # Configuration for tiered pricing - tiered_config:, - # Configuration for bulk pricing - bulk_config:, - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # Configuration for package pricing - package_config:, - # Configuration for matrix pricing - matrix_config:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # Configuration for tiered_package pricing - tiered_package_config:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # Configuration for percent pricing - percent_config:, - # Configuration for event_output pricing - event_output_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, - # 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, - request_options: {} - ) - end - - sig do - override.returns( - { - cadence: Orb::PriceCreateParams::Cadence::OrSymbol, - currency: String, - item_id: String, - model_type: Orb::PriceCreateParams::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 - ) - ), - 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)]), - tiered_config: Orb::TieredConfig, - bulk_config: Orb::BulkConfig, - bulk_with_filters_config: - Orb::PriceCreateParams::BulkWithFiltersConfig, - package_config: Orb::PackageConfig, - matrix_config: Orb::MatrixConfig, - threshold_total_amount_config: - Orb::PriceCreateParams::ThresholdTotalAmountConfig, - tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig, - tiered_with_minimum_config: - Orb::PriceCreateParams::TieredWithMinimumConfig, - grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig, - tiered_package_with_minimum_config: - Orb::PriceCreateParams::TieredPackageWithMinimumConfig, - package_with_allocation_config: - Orb::PriceCreateParams::PackageWithAllocationConfig, - unit_with_percent_config: - Orb::PriceCreateParams::UnitWithPercentConfig, - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - tiered_with_proration_config: - Orb::PriceCreateParams::TieredWithProrationConfig, - unit_with_proration_config: - Orb::PriceCreateParams::UnitWithProrationConfig, - grouped_allocation_config: - Orb::PriceCreateParams::GroupedAllocationConfig, - bulk_with_proration_config: - Orb::PriceCreateParams::BulkWithProrationConfig, - grouped_with_prorated_minimum_config: - Orb::PriceCreateParams::GroupedWithProratedMinimumConfig, - grouped_with_metered_minimum_config: - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig, - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - matrix_with_display_name_config: - Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - grouped_tiered_package_config: - Orb::PriceCreateParams::GroupedTieredPackageConfig, - max_group_tiered_package_config: - Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - scalable_matrix_with_unit_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - scalable_matrix_with_tiered_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - cumulative_grouped_bulk_config: - Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::CumulativeGroupedAllocationConfig, - minimum_composite_config: - Orb::PriceCreateParams::MinimumCompositeConfig, - percent_config: Orb::PriceCreateParams::PercentConfig, - event_output_config: Orb::PriceCreateParams::EventOutputConfig, - request_options: Orb::RequestOptions - } - ) - end - def to_hash - end - - # The cadence to bill for this price on. - module Cadence - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, Orb::PriceCreateParams::Cadence) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - ANNUAL = T.let(:annual, Orb::PriceCreateParams::Cadence::TaggedSymbol) - SEMI_ANNUAL = - T.let(:semi_annual, Orb::PriceCreateParams::Cadence::TaggedSymbol) - MONTHLY = T.let(:monthly, Orb::PriceCreateParams::Cadence::TaggedSymbol) - QUARTERLY = - T.let(:quarterly, Orb::PriceCreateParams::Cadence::TaggedSymbol) - ONE_TIME = - T.let(:one_time, Orb::PriceCreateParams::Cadence::TaggedSymbol) - CUSTOM = T.let(:custom, Orb::PriceCreateParams::Cadence::TaggedSymbol) - - sig do - override.returns( - T::Array[Orb::PriceCreateParams::Cadence::TaggedSymbol] - ) - end - def self.values - end - end - - # The pricing model type - module ModelType - extend Orb::Internal::Type::Enum - - TaggedSymbol = - T.type_alias { T.all(Symbol, Orb::PriceCreateParams::ModelType) } - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EVENT_OUTPUT = - T.let(:event_output, Orb::PriceCreateParams::ModelType::TaggedSymbol) - - sig do - override.returns( - T::Array[Orb::PriceCreateParams::ModelType::TaggedSymbol] - ) - end - def self.values - end - end - - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::BulkWithFiltersConfig, - Orb::Internal::AnyHash - ) - end - - # Property filters to apply (all must match) - sig do - returns( - T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter] - ) - end - attr_accessor :filters - - # Bulk tiers for rating based on total usage volume - sig do - returns(T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier]) - end - attr_accessor :tiers - - # Configuration for bulk_with_filters pricing - sig do - params( - filters: - T::Array[ - Orb::PriceCreateParams::BulkWithFiltersConfig::Filter::OrHash - ], - tiers: - T::Array[ - Orb::PriceCreateParams::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::PriceCreateParams::BulkWithFiltersConfig::Filter], - tiers: - T::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] - } - ) - end - def to_hash - end - - class Filter < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::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 ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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 { override.returns({ threshold: String, total_amount: String }) } - def to_hash - end - end - end - - class TieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::TieredPackageConfig::Tier]) - end - attr_accessor :tiers - - # Configuration for tiered_package pricing - sig do - params( - package_size: String, - tiers: - T::Array[ - Orb::PriceCreateParams::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::PriceCreateParams::TieredPackageConfig::Tier] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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 - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::GroupedTieredConfig::Tier]) - end - attr_accessor :tiers - - # Configuration for grouped_tiered pricing - sig do - params( - grouping_key: String, - tiers: - T::Array[ - Orb::PriceCreateParams::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::PriceCreateParams::GroupedTieredConfig::Tier] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::TieredPackageWithMinimumConfig::Tier - ] + # New floating price request body params. + sig do + returns( + T.any( + Orb::NewFloatingUnitPrice, + Orb::NewFloatingTieredPrice, + Orb::NewFloatingBulkPrice, + Orb::PriceCreateParams::Body::BulkWithFilters, + Orb::NewFloatingPackagePrice, + Orb::NewFloatingMatrixPrice, + Orb::NewFloatingThresholdTotalAmountPrice, + Orb::NewFloatingTieredPackagePrice, + Orb::NewFloatingTieredWithMinimumPrice, + Orb::NewFloatingGroupedTieredPrice, + Orb::NewFloatingTieredPackageWithMinimumPrice, + Orb::NewFloatingPackageWithAllocationPrice, + Orb::NewFloatingUnitWithPercentPrice, + Orb::NewFloatingMatrixWithAllocationPrice, + Orb::NewFloatingTieredWithProrationPrice, + Orb::NewFloatingUnitWithProrationPrice, + Orb::NewFloatingGroupedAllocationPrice, + Orb::NewFloatingBulkWithProrationPrice, + Orb::NewFloatingGroupedWithProratedMinimumPrice, + Orb::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, + Orb::NewFloatingMatrixWithDisplayNamePrice, + Orb::NewFloatingGroupedTieredPackagePrice, + Orb::NewFloatingMaxGroupTieredPackagePrice, + Orb::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::NewFloatingCumulativeGroupedBulkPrice, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::NewFloatingMinimumCompositePrice, + Orb::PriceCreateParams::Body::Percent, + Orb::PriceCreateParams::Body::EventOutput ) - end - attr_accessor :tiers - - # Configuration for tiered_package_with_minimum pricing - sig do - params( - package_size: Float, - tiers: - T::Array[ - Orb::PriceCreateParams::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::PriceCreateParams::TieredPackageWithMinimumConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 + attr_accessor :body - class PackageWithAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do + sig do + params( + body: T.any( - Orb::PriceCreateParams::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 + Orb::NewFloatingUnitPrice::OrHash, + Orb::NewFloatingTieredPrice::OrHash, + Orb::NewFloatingBulkPrice::OrHash, + Orb::PriceCreateParams::Body::BulkWithFilters::OrHash, + Orb::NewFloatingPackagePrice::OrHash, + Orb::NewFloatingMatrixPrice::OrHash, + Orb::NewFloatingThresholdTotalAmountPrice::OrHash, + Orb::NewFloatingTieredPackagePrice::OrHash, + Orb::NewFloatingTieredWithMinimumPrice::OrHash, + Orb::NewFloatingGroupedTieredPrice::OrHash, + Orb::NewFloatingTieredPackageWithMinimumPrice::OrHash, + Orb::NewFloatingPackageWithAllocationPrice::OrHash, + Orb::NewFloatingUnitWithPercentPrice::OrHash, + Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::NewFloatingTieredWithProrationPrice::OrHash, + Orb::NewFloatingUnitWithProrationPrice::OrHash, + Orb::NewFloatingGroupedAllocationPrice::OrHash, + Orb::NewFloatingBulkWithProrationPrice::OrHash, + Orb::NewFloatingGroupedWithProratedMinimumPrice::OrHash, + Orb::NewFloatingGroupedWithMeteredMinimumPrice::OrHash, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::OrHash, + Orb::NewFloatingMatrixWithDisplayNamePrice::OrHash, + Orb::NewFloatingGroupedTieredPackagePrice::OrHash, + Orb::NewFloatingMaxGroupTieredPackagePrice::OrHash, + Orb::NewFloatingScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::NewFloatingMinimumCompositePrice::OrHash, + Orb::PriceCreateParams::Body::Percent::OrHash, + Orb::PriceCreateParams::Body::EventOutput::OrHash + ), + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # New floating price request body params. + body:, + request_options: {} + ) end - class UnitWithPercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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: + sig do + override.returns( + { + body: + T.any( + Orb::NewFloatingUnitPrice, + Orb::NewFloatingTieredPrice, + Orb::NewFloatingBulkPrice, + Orb::PriceCreateParams::Body::BulkWithFilters, + Orb::NewFloatingPackagePrice, + Orb::NewFloatingMatrixPrice, + Orb::NewFloatingThresholdTotalAmountPrice, + Orb::NewFloatingTieredPackagePrice, + Orb::NewFloatingTieredWithMinimumPrice, + Orb::NewFloatingGroupedTieredPrice, + Orb::NewFloatingTieredPackageWithMinimumPrice, + Orb::NewFloatingPackageWithAllocationPrice, + Orb::NewFloatingUnitWithPercentPrice, + Orb::NewFloatingMatrixWithAllocationPrice, + Orb::NewFloatingTieredWithProrationPrice, + Orb::NewFloatingUnitWithProrationPrice, + Orb::NewFloatingGroupedAllocationPrice, + Orb::NewFloatingBulkWithProrationPrice, + Orb::NewFloatingGroupedWithProratedMinimumPrice, + Orb::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, + Orb::NewFloatingMatrixWithDisplayNamePrice, + Orb::NewFloatingGroupedTieredPackagePrice, + Orb::NewFloatingMaxGroupTieredPackagePrice, + Orb::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::NewFloatingCumulativeGroupedBulkPrice, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::NewFloatingMinimumCompositePrice, + Orb::PriceCreateParams::Body::Percent, + Orb::PriceCreateParams::Body::EventOutput + ), + request_options: Orb::RequestOptions + } ) - end - - sig { override.returns({ percent: String, unit_amount: String }) } - def to_hash - end + end + def to_hash end - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = + # New floating price request body params. + module Body + extend Orb::Internal::Type::Union + + Variants = T.type_alias do T.any( - Orb::PriceCreateParams::TieredWithProrationConfig, - Orb::Internal::AnyHash + Orb::NewFloatingUnitPrice, + Orb::NewFloatingTieredPrice, + Orb::NewFloatingBulkPrice, + Orb::PriceCreateParams::Body::BulkWithFilters, + Orb::NewFloatingPackagePrice, + Orb::NewFloatingMatrixPrice, + Orb::NewFloatingThresholdTotalAmountPrice, + Orb::NewFloatingTieredPackagePrice, + Orb::NewFloatingTieredWithMinimumPrice, + Orb::NewFloatingGroupedTieredPrice, + Orb::NewFloatingTieredPackageWithMinimumPrice, + Orb::NewFloatingPackageWithAllocationPrice, + Orb::NewFloatingUnitWithPercentPrice, + Orb::NewFloatingMatrixWithAllocationPrice, + Orb::NewFloatingTieredWithProrationPrice, + Orb::NewFloatingUnitWithProrationPrice, + Orb::NewFloatingGroupedAllocationPrice, + Orb::NewFloatingBulkWithProrationPrice, + Orb::NewFloatingGroupedWithProratedMinimumPrice, + Orb::NewFloatingGroupedWithMeteredMinimumPrice, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, + Orb::NewFloatingMatrixWithDisplayNamePrice, + Orb::NewFloatingGroupedTieredPackagePrice, + Orb::NewFloatingMaxGroupTieredPackagePrice, + Orb::NewFloatingScalableMatrixWithUnitPricingPrice, + Orb::NewFloatingScalableMatrixWithTieredPricingPrice, + Orb::NewFloatingCumulativeGroupedBulkPrice, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, + Orb::NewFloatingMinimumCompositePrice, + Orb::PriceCreateParams::Body::Percent, + Orb::PriceCreateParams::Body::EventOutput ) end - # Tiers for rating based on total usage quantities into the specified tier with - # proration - sig do - returns( - T::Array[Orb::PriceCreateParams::TieredWithProrationConfig::Tier] - ) - end - attr_accessor :tiers - - # Configuration for tiered_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PriceCreateParams::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::PriceCreateParams::TieredWithProrationConfig::Tier - ] - } - ) - end - def to_hash - end - - class Tier < Orb::Internal::Type::BaseModel + class BulkWithFilters < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::TieredWithProrationConfig::Tier, + Orb::PriceCreateParams::Body::BulkWithFilters, 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 + # Configuration for bulk_with_filters pricing sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + returns( + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig ) end - def self.new( - # Inclusive tier starting value - tier_lower_bound:, - # Amount per unit - unit_amount: - ) - end + attr_reader :bulk_with_filters_config sig do - override.returns({ tier_lower_bound: String, unit_amount: String }) - end - def to_hash + params( + bulk_with_filters_config: + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::OrHash + ).void end - end - end + attr_writer :bulk_with_filters_config - class UnitWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::UnitWithProrationConfig, - Orb::Internal::AnyHash + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol ) end + attr_accessor :cadence - # Rate per unit of usage - sig { returns(String) } - attr_accessor :unit_amount + # An ISO 4217 currency string for which this price is billed in. + sig { returns(String) } + attr_accessor :currency - # 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 + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - sig { override.returns({ unit_amount: String }) } - def to_hash - end - end + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - class GroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::GroupedAllocationConfig, - Orb::Internal::AnyHash - ) - end + # The name of the price. + sig { returns(String) } + attr_accessor :name - # Usage allocation per group - sig { returns(String) } - attr_accessor :allocation + # 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 - # How to determine the groups that should each be allocated some quantity - sig { returns(String) } - attr_accessor :grouping_key + # If 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 - # Unit rate for post-allocation - sig { returns(String) } - attr_accessor :overage_unit_rate + # 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 - # 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 + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :billing_cycle_configuration - sig do - override.returns( - { - allocation: String, - grouping_key: String, - overage_unit_rate: String - } - ) - end - def to_hash - end - end + # The per unit conversion rate of the price currency to the invoicing currency. + sig { returns(T.nilable(Float)) } + attr_accessor :conversion_rate - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::BulkWithProrationConfig, - Orb::Internal::AnyHash + # 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 - # Bulk tiers for rating based on total usage volume - sig do - returns( - T::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] - ) - end - attr_accessor :tiers + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # Configuration for bulk_with_proration pricing - sig do - params( - tiers: - T::Array[ - Orb::PriceCreateParams::BulkWithProrationConfig::Tier::OrHash - ] - ).returns(T.attached_class) - end - def self.new( - # Bulk tiers for rating based on total usage volume - tiers: - ) - end + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - sig do - override.returns( - { - tiers: - T::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] - } - ) - end - def to_hash - end + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::BulkWithProrationConfig::Tier, - 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 - # Cost per unit - sig { returns(String) } - attr_accessor :unit_amount + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The lower bound for this tier + # 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 :tier_lower_bound + 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 - # Configuration for a single bulk pricing tier with proration sig do params( - unit_amount: String, - tier_lower_bound: T.nilable(String) + bulk_with_filters_config: + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::OrHash, + cadence: + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol, + currency: String, + 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( - # Cost per unit - unit_amount:, - # The lower bound for this tier - tier_lower_bound: nil + # Configuration for bulk_with_filters pricing + bulk_with_filters_config:, + # 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:, + # 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: :bulk_with_filters ) end sig do override.returns( - { unit_amount: String, tier_lower_bound: T.nilable(String) } + { + bulk_with_filters_config: + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig, + cadence: + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::OrSymbol, + currency: String, + 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 - end - end - - class GroupedWithProratedMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 GroupedWithMeteredMinimumConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::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::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor::OrHash - ], - scaling_key: String, - unit_amounts: - T::Array[ - Orb::PriceCreateParams::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 + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig, + Orb::Internal::AnyHash + ) + end - sig do - override.returns( - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: + # Property filters to apply (all must match) + sig do + returns( T::Array[ - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor - ], - scaling_key: String, - unit_amounts: + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter + ] + ) + end + attr_accessor :filters + + # Bulk tiers for rating based on total usage volume + sig do + returns( T::Array[ - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier ] - } - ) - end - def to_hash - end + ) + end + attr_accessor :tiers + + # Configuration for bulk_with_filters pricing + sig do + params( + filters: + T::Array[ + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter::OrHash + ], + tiers: + T::Array[ + Orb::PriceCreateParams::Body::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 - class ScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor, - Orb::Internal::AnyHash + sig do + override.returns( + { + filters: + T::Array[ + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter + ], + tiers: + T::Array[ + Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier + ] + } ) end + def to_hash + end - sig { returns(String) } - attr_accessor :scaling_factor + class Filter < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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 { returns(String) } - attr_accessor :scaling_value + sig do + override.returns( + { property_key: String, property_value: String } + ) + end + def to_hash + end + end - # 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 + class Tier < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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({ scaling_factor: String, scaling_value: String }) + sig do + override.returns( + { unit_amount: String, tier_lower_bound: T.nilable(String) } + ) + end + def to_hash + end + end end - def to_hash + + # 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::BulkWithFilters::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::BulkWithFilters::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end end - class UnitAmount < Orb::Internal::Type::BaseModel + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Internal::AnyHash ) end - sig { returns(String) } - attr_accessor :pricing_value + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol + ) + end + attr_accessor :cadence - # Per unit amount + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :currency - # Configuration for a unit amount + # Configuration for grouped_with_min_max_thresholds pricing sig do - params(pricing_value: String, unit_amount: String).returns( - T.attached_class + returns( + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig ) end - def self.new( - pricing_value:, - # Per unit amount - unit_amount: - ) - end + attr_reader :grouped_with_min_max_thresholds_config sig do - override.returns({ pricing_value: String, unit_amount: String }) - end - def to_hash + params( + grouped_with_min_max_thresholds_config: + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig::OrHash + ).void end - end - end + attr_writer :grouped_with_min_max_thresholds_config - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - Orb::Internal::AnyHash - ) - end + # The id of the item the price will be associated with. + sig { returns(String) } + attr_accessor :item_id - # The event property used to group before applying thresholds - sig { returns(String) } - attr_accessor :grouping_key + # The pricing model type + sig { returns(Symbol) } + attr_accessor :model_type - # The maximum amount to charge each group - sig { returns(String) } - attr_accessor :maximum_charge + # The name of the price. + sig { returns(String) } + attr_accessor :name - # The minimum amount to charge each group, regardless of usage - sig { returns(String) } - attr_accessor :minimum_charge + # 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 base price charged per group - sig { returns(String) } - attr_accessor :per_unit_rate + # If 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 - # 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 + # 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( - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - ) - 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 MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - Orb::Internal::AnyHash + # 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 - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :dimension + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # Apply per unit pricing to each dimension value - sig do - returns( - T::Array[ - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount - ] - ) - end - attr_accessor :unit_amounts + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # Configuration for matrix_with_display_name pricing - sig do - params( - dimension: String, - unit_amounts: - T::Array[ - Orb::PriceCreateParams::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 + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - override.returns( - { - dimension: String, - unit_amounts: - T::Array[ - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount - ] - } - ) - 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 - class UnitAmount < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount, - Orb::Internal::AnyHash - ) - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # The dimension value - sig { returns(String) } - attr_accessor :dimension_value + # 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 - # Display name for this dimension value - sig { returns(String) } - attr_accessor :display_name + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount + # 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 - # Configuration for a unit amount item sig do params( - dimension_value: String, - display_name: String, - unit_amount: String + cadence: + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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 dimension value - dimension_value:, - # Display name for this dimension value - display_name:, - # Per unit amount - unit_amount: + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # 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, + # 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: :grouped_with_min_max_thresholds ) end sig do override.returns( { - dimension_value: String, - display_name: String, - unit_amount: String + cadence: + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::OrSymbol, + currency: String, + grouped_with_min_max_thresholds_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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 - end - end - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::GroupedTieredPackageConfig, - Orb::Internal::AnyHash - ) + # 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::GroupedWithMinMaxThresholds::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::Cadence::TaggedSymbol + ] + ) + end + def self.values + end end - # The event property used to group before tiering - sig { returns(String) } - attr_accessor :grouping_key + class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + Orb::Internal::AnyHash + ) + end - sig { returns(String) } - attr_accessor :package_size + # The event property used to group before applying thresholds + sig { returns(String) } + attr_accessor :grouping_key - # 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::PriceCreateParams::GroupedTieredPackageConfig::Tier] - ) - end - attr_accessor :tiers + # The maximum amount to charge each group + sig { returns(String) } + attr_accessor :maximum_charge - # Configuration for grouped_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PriceCreateParams::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 + # The minimum amount to charge each group, regardless of usage + sig { returns(String) } + attr_accessor :minimum_charge - sig do - override.returns( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier - ] - } - ) - end - def to_hash + # 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 Tier < Orb::Internal::Type::BaseModel + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation, 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 + # The cadence to bill for this price on. sig do - params(per_unit: String, tier_lower_bound: String).returns( - T.attached_class + returns( + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol ) end - def self.new( - # Per package - per_unit:, - tier_lower_bound: - ) + attr_accessor :cadence + + # Configuration for cumulative_grouped_allocation pricing + sig do + returns( + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + ) end + attr_reader :cumulative_grouped_allocation_config sig do - override.returns({ per_unit: String, tier_lower_bound: String }) + params( + cumulative_grouped_allocation_config: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash + ).void end - def to_hash + attr_writer :cumulative_grouped_allocation_config + + # 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 + + # 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 - end - end + attr_writer :billing_cycle_configuration - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - Orb::Internal::AnyHash + # 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 - # The event property used to group before tiering the group with the highest value - sig { returns(String) } - attr_accessor :grouping_key + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - sig { returns(String) } - attr_accessor :package_size + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # Apply tiered pricing to the largest group after grouping with the provided key. - sig do - returns( - T::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] - ) - end - attr_accessor :tiers + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - # Configuration for max_group_tiered_package pricing - sig do - params( - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PriceCreateParams::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 + # 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( - { - grouping_key: String, - package_size: String, - tiers: - T::Array[ - Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier - ] - } - ) - 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 - class Tier < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier, - Orb::Internal::AnyHash - ) - 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 { returns(String) } - attr_accessor :tier_lower_bound + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # Per unit amount - sig { returns(String) } - attr_accessor :unit_amount + # 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 - # Configuration for a single tier sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class - ) + params( + cadence: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig::OrHash, + currency: String, + 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( - tier_lower_bound:, - # Per unit amount - unit_amount: + # The cadence to bill for this price on. + cadence:, + # Configuration for cumulative_grouped_allocation pricing + cumulative_grouped_allocation_config:, + # 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:, + # 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: :cumulative_grouped_allocation ) end sig do - override.returns({ tier_lower_bound: String, unit_amount: String }) + override.returns( + { + cadence: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::OrSymbol, + cumulative_grouped_allocation_config: + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + currency: String, + 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 - end - end - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - 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::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - # Used to determine the unit rate - sig { returns(String) } - attr_accessor :first_dimension + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ) - # Apply a scaling factor to each dimension - sig do - returns( - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end - # The final unit price to rate against the output of the matrix - sig { returns(String) } - attr_accessor :unit_price + class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + Orb::Internal::AnyHash + ) + end - # The property used to group this price - sig { returns(T.nilable(String)) } - attr_accessor :grouping_key + # The overall allocation across all groups + sig { returns(String) } + attr_accessor :cumulative_allocation - # If true, the unit price will be prorated to the billing period - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :prorate + # The allocation per individual group + sig { returns(String) } + attr_accessor :group_allocation - # Used to determine the unit rate (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension + # The event property used to group usage before applying allocations + sig { returns(String) } + attr_accessor :grouping_key - # Configuration for scalable_matrix_with_unit_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PriceCreateParams::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 + # The amount to charge for each unit outside of the allocation + sig { returns(String) } + attr_accessor :unit_amount - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor - ], - unit_price: String, - grouping_key: T.nilable(String), - prorate: T.nilable(T::Boolean), - second_dimension: T.nilable(String) - } - ) - end - def to_hash + # 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 MatrixScalingFactor < Orb::Internal::Type::BaseModel + class Percent < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor, + Orb::PriceCreateParams::Body::Percent, Orb::Internal::AnyHash ) end + # The cadence to bill for this price on. + sig do + returns(Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol) + end + attr_accessor :cadence + + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } - attr_accessor :first_dimension_value + attr_accessor :currency + # The id of the item the price will be associated with. sig { returns(String) } - attr_accessor :scaling_factor + attr_accessor :item_id - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension_value + # 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 { returns(Orb::PriceCreateParams::Body::Percent::PercentConfig) } + attr_reader :percent_config - # 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 - ) + percent_config: + Orb::PriceCreateParams::Body::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 - override.returns( - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) - } - ) - end - def to_hash + params( + billing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void end - end - end + attr_writer :billing_cycle_configuration - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - Orb::Internal::AnyHash + # 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 - # 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::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ] - ) - end - attr_accessor :matrix_scaling_factors - - sig do - returns( - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier - ] - ) - end - attr_accessor :tiers + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - # Used for the scalable matrix second dimension (optional) - sig { returns(T.nilable(String)) } - attr_accessor :second_dimension + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # Configuration for scalable_matrix_with_tiered_pricing pricing - sig do - params( - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor::OrHash - ], - tiers: - T::Array[ - Orb::PriceCreateParams::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 + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - override.returns( - { - first_dimension: String, - matrix_scaling_factors: - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor - ], - tiers: - T::Array[ - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier - ], - second_dimension: T.nilable(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 - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor, - Orb::Internal::AnyHash - ) - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - sig { returns(String) } - attr_accessor :first_dimension_value + # 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 { returns(String) } - attr_accessor :scaling_factor + 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 :second_dimension_value + 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 - # Configuration for a single matrix scaling factor sig do params( - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) + cadence: Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol, + currency: String, + item_id: String, + name: String, + percent_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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( - first_dimension_value:, - scaling_factor:, - second_dimension_value: nil + # 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:, + # 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, + # 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: :percent ) end sig do override.returns( { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: T.nilable(String) + cadence: + Orb::PriceCreateParams::Body::Percent::Cadence::OrSymbol, + currency: String, + item_id: String, + model_type: Symbol, + name: String, + percent_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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::Percent::Cadence) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::Percent::Cadence::TaggedSymbol + ] + ) + end + def self.values + end + end + + class PercentConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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 Tier < Orb::Internal::Type::BaseModel + class EventOutput < Orb::Internal::Type::BaseModel OrHash = T.type_alias do T.any( - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier, + Orb::PriceCreateParams::Body::EventOutput, Orb::Internal::AnyHash ) end - sig { returns(String) } - attr_accessor :tier_lower_bound + # The cadence to bill for this price on. + sig do + returns( + Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol + ) + end + attr_accessor :cadence + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } - attr_accessor :unit_amount + attr_accessor :currency - # Configuration for a single tier entry with business logic + # Configuration for event_output pricing sig do - params(tier_lower_bound: String, unit_amount: String).returns( - T.attached_class + returns( + Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig ) end - def self.new(tier_lower_bound:, unit_amount:) - end + attr_reader :event_output_config sig do - override.returns({ tier_lower_bound: String, unit_amount: String }) + params( + event_output_config: + Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig::OrHash + ).void end - def to_hash + 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 - end - end + attr_writer :billing_cycle_configuration - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - Orb::Internal::AnyHash + # 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 - # Each tier lower bound must have the same group of values. - sig do - returns( - T::Array[ - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue - ] - ) - end - attr_accessor :dimension_values + # For dimensional price: specifies a price group and dimension values + sig { returns(T.nilable(Orb::NewDimensionalPriceConfiguration)) } + attr_reader :dimensional_price_configuration - sig { returns(String) } - attr_accessor :group + sig do + params( + dimensional_price_configuration: + T.nilable(Orb::NewDimensionalPriceConfiguration::OrHash) + ).void + end + attr_writer :dimensional_price_configuration - # Configuration for cumulative_grouped_bulk pricing - sig do - params( - dimension_values: - T::Array[ - Orb::PriceCreateParams::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 + # An alias for the price. + sig { returns(T.nilable(String)) } + attr_accessor :external_price_id - sig do - override.returns( - { - dimension_values: - T::Array[ - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue - ], - group: 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 - class DimensionValue < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue, - Orb::Internal::AnyHash - ) - end + # The property used to group this price on an invoice + sig { returns(T.nilable(String)) } + attr_accessor :invoice_grouping_key - # Grouping key value - sig { returns(String) } - attr_accessor :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 - # Tier lower bound - sig { returns(String) } - attr_accessor :tier_lower_bound + sig do + params( + invoicing_cycle_configuration: + T.nilable(Orb::NewBillingCycleConfiguration::OrHash) + ).void + end + attr_writer :invoicing_cycle_configuration - # Unit amount for this combination - sig { returns(String) } - attr_accessor :unit_amount + # 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 - # Configuration for a dimension value entry sig do params( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String + cadence: + Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol, + currency: String, + event_output_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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( - # Grouping key value - grouping_key:, - # Tier lower bound - tier_lower_bound:, - # Unit amount for this combination - unit_amount: + # The cadence to bill for this price on. + cadence:, + # An ISO 4217 currency string for which this price is billed in. + currency:, + # 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, + # 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: :event_output ) end sig do override.returns( { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String + cadence: + Orb::PriceCreateParams::Body::EventOutput::Cadence::OrSymbol, + currency: String, + event_output_config: + Orb::PriceCreateParams::Body::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 + ) + ), + 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 - end - end - - class CumulativeGroupedAllocationConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 MinimumCompositeConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::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 + # The cadence to bill for this price on. + module Cadence + extend Orb::Internal::Type::Enum - 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 + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + Orb::PriceCreateParams::Body::EventOutput::Cadence + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } - sig do - override.returns({ minimum_amount: String, prorated: T::Boolean }) - end - def to_hash - end - end + ANNUAL = + T.let( + :annual, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) + SEMI_ANNUAL = + T.let( + :semi_annual, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) + MONTHLY = + T.let( + :monthly, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) + QUARTERLY = + T.let( + :quarterly, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) + ONE_TIME = + T.let( + :one_time, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) + CUSTOM = + T.let( + :custom, + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ) - class PercentConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any(Orb::PriceCreateParams::PercentConfig, Orb::Internal::AnyHash) + sig do + override.returns( + T::Array[ + Orb::PriceCreateParams::Body::EventOutput::Cadence::TaggedSymbol + ] + ) + end + def self.values + end 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 - - class EventOutputConfig < Orb::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - Orb::PriceCreateParams::EventOutputConfig, - Orb::Internal::AnyHash + class EventOutputConfig < Orb::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + Orb::PriceCreateParams::Body::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 - - # 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 + end - # 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 - ) + 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( - { - unit_rating_key: String, - default_unit_rate: T.nilable(String), - grouping_key: T.nilable(String) - } - ) + override.returns(T::Array[Orb::PriceCreateParams::Body::Variants]) end - def to_hash + def self.variants end end end diff --git a/rbi/orb/models/price_evaluate_params.rbi b/rbi/orb/models/price_evaluate_params.rbi index 8f24a4b09..4d15611b0 100644 --- a/rbi/orb/models/price_evaluate_params.rbi +++ b/rbi/orb/models/price_evaluate_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::PriceEvaluateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :price_id + # The exclusive upper bound for event timestamps sig { returns(Time) } attr_accessor :timeframe_end @@ -47,6 +50,7 @@ module Orb sig do params( + price_id: String, timeframe_end: Time, timeframe_start: Time, customer_id: T.nilable(String), @@ -58,6 +62,7 @@ module Orb ).returns(T.attached_class) end def self.new( + price_id:, # The exclusive upper bound for event timestamps timeframe_end:, # The inclusive lower bound for event timestamps @@ -84,6 +89,7 @@ module Orb sig do override.returns( { + price_id: String, timeframe_end: Time, timeframe_start: Time, customer_id: T.nilable(String), diff --git a/rbi/orb/models/price_fetch_params.rbi b/rbi/orb/models/price_fetch_params.rbi index e92313b6d..e2e49527a 100644 --- a/rbi/orb/models/price_fetch_params.rbi +++ b/rbi/orb/models/price_fetch_params.rbi @@ -9,15 +9,23 @@ module Orb OrHash = T.type_alias { T.any(Orb::PriceFetchParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :price_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + price_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(price_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { price_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/price_update_params.rbi b/rbi/orb/models/price_update_params.rbi index 26739209b..a61b631b5 100644 --- a/rbi/orb/models/price_update_params.rbi +++ b/rbi/orb/models/price_update_params.rbi @@ -9,6 +9,9 @@ module Orb OrHash = T.type_alias { T.any(Orb::PriceUpdateParams, Orb::Internal::AnyHash) } + sig { returns(String) } + attr_accessor :price_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`. @@ -17,11 +20,13 @@ module Orb sig do params( + price_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + price_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`. @@ -33,6 +38,7 @@ module Orb sig do override.returns( { + price_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions } diff --git a/rbi/orb/models/prices/external_price_id_fetch_params.rbi b/rbi/orb/models/prices/external_price_id_fetch_params.rbi index 5f3d751d9..bc67c4f28 100644 --- a/rbi/orb/models/prices/external_price_id_fetch_params.rbi +++ b/rbi/orb/models/prices/external_price_id_fetch_params.rbi @@ -15,15 +15,23 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_price_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + external_price_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(external_price_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { external_price_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/prices/external_price_id_update_params.rbi b/rbi/orb/models/prices/external_price_id_update_params.rbi index 92a9257b7..4219f9cba 100644 --- a/rbi/orb/models/prices/external_price_id_update_params.rbi +++ b/rbi/orb/models/prices/external_price_id_update_params.rbi @@ -15,6 +15,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :external_price_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`. @@ -23,11 +26,13 @@ module Orb sig do params( + external_price_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + external_price_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`. @@ -39,6 +44,7 @@ module Orb sig do override.returns( { + external_price_id: String, metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), request_options: Orb::RequestOptions } diff --git a/rbi/orb/models/subscription_cancel_params.rbi b/rbi/orb/models/subscription_cancel_params.rbi index 35689fc7a..538a9bffa 100644 --- a/rbi/orb/models/subscription_cancel_params.rbi +++ b/rbi/orb/models/subscription_cancel_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionCancelParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # Determines the timing of subscription cancellation sig { returns(Orb::SubscriptionCancelParams::CancelOption::OrSymbol) } attr_accessor :cancel_option @@ -28,6 +31,7 @@ module Orb sig do params( + subscription_id: String, cancel_option: Orb::SubscriptionCancelParams::CancelOption::OrSymbol, allow_invoice_credit_or_void: T.nilable(T::Boolean), cancellation_date: T.nilable(Time), @@ -35,6 +39,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # Determines the timing of subscription cancellation cancel_option:, # If false, this request will fail if it would void an issued invoice or create a @@ -51,6 +56,7 @@ module Orb sig do override.returns( { + subscription_id: String, cancel_option: Orb::SubscriptionCancelParams::CancelOption::OrSymbol, allow_invoice_credit_or_void: T.nilable(T::Boolean), diff --git a/rbi/orb/models/subscription_change_apply_params.rbi b/rbi/orb/models/subscription_change_apply_params.rbi index 05acb04e1..713626858 100644 --- a/rbi/orb/models/subscription_change_apply_params.rbi +++ b/rbi/orb/models/subscription_change_apply_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionChangeApplyParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_change_id + # Description to apply to the balance transaction representing this credit. sig { returns(T.nilable(String)) } attr_accessor :description @@ -41,6 +44,7 @@ module Orb sig do params( + subscription_change_id: String, description: T.nilable(String), mark_as_paid: T.nilable(T::Boolean), payment_external_id: T.nilable(String), @@ -51,6 +55,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_change_id:, # Description to apply to the balance transaction representing this credit. description: nil, # Mark all pending invoices that are payable as paid. If amount is also provided, @@ -74,6 +79,7 @@ module Orb sig do override.returns( { + subscription_change_id: String, description: T.nilable(String), mark_as_paid: T.nilable(T::Boolean), payment_external_id: T.nilable(String), diff --git a/rbi/orb/models/subscription_change_cancel_params.rbi b/rbi/orb/models/subscription_change_cancel_params.rbi index f970a92c2..99b8ca675 100644 --- a/rbi/orb/models/subscription_change_cancel_params.rbi +++ b/rbi/orb/models/subscription_change_cancel_params.rbi @@ -11,15 +11,26 @@ module Orb T.any(Orb::SubscriptionChangeCancelParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_change_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + subscription_change_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(subscription_change_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { + subscription_change_id: String, + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/orb/models/subscription_change_retrieve_params.rbi b/rbi/orb/models/subscription_change_retrieve_params.rbi index 6281c0491..65dbb7c82 100644 --- a/rbi/orb/models/subscription_change_retrieve_params.rbi +++ b/rbi/orb/models/subscription_change_retrieve_params.rbi @@ -11,15 +11,26 @@ module Orb T.any(Orb::SubscriptionChangeRetrieveParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_change_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + subscription_change_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(subscription_change_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { + subscription_change_id: String, + request_options: Orb::RequestOptions + } + ) + end def to_hash end end diff --git a/rbi/orb/models/subscription_fetch_costs_params.rbi b/rbi/orb/models/subscription_fetch_costs_params.rbi index ae48506f1..2fa2bad73 100644 --- a/rbi/orb/models/subscription_fetch_costs_params.rbi +++ b/rbi/orb/models/subscription_fetch_costs_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionFetchCostsParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } attr_accessor :currency @@ -36,6 +39,7 @@ module Orb sig do params( + subscription_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), @@ -45,6 +49,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # The currency or custom pricing unit to use. currency: nil, # Costs returned are exclusive of `timeframe_end`. @@ -63,6 +68,7 @@ module Orb sig do override.returns( { + subscription_id: String, currency: T.nilable(String), timeframe_end: T.nilable(Time), timeframe_start: T.nilable(Time), diff --git a/rbi/orb/models/subscription_fetch_params.rbi b/rbi/orb/models/subscription_fetch_params.rbi index 292c03e80..f0ac0b0c1 100644 --- a/rbi/orb/models/subscription_fetch_params.rbi +++ b/rbi/orb/models/subscription_fetch_params.rbi @@ -11,15 +11,23 @@ module Orb T.any(Orb::SubscriptionFetchParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + subscription_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(subscription_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { subscription_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/subscription_fetch_schedule_params.rbi b/rbi/orb/models/subscription_fetch_schedule_params.rbi index 79b8a6e24..e97522745 100644 --- a/rbi/orb/models/subscription_fetch_schedule_params.rbi +++ b/rbi/orb/models/subscription_fetch_schedule_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionFetchScheduleParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. sig { returns(T.nilable(String)) } @@ -37,6 +40,7 @@ module Orb sig do params( + subscription_id: String, cursor: T.nilable(String), limit: Integer, start_date_gt: T.nilable(Time), @@ -47,6 +51,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. cursor: nil, @@ -63,6 +68,7 @@ module Orb sig do override.returns( { + subscription_id: String, cursor: T.nilable(String), limit: Integer, start_date_gt: T.nilable(Time), diff --git a/rbi/orb/models/subscription_fetch_usage_params.rbi b/rbi/orb/models/subscription_fetch_usage_params.rbi index 5ed3f1502..d41c44d72 100644 --- a/rbi/orb/models/subscription_fetch_usage_params.rbi +++ b/rbi/orb/models/subscription_fetch_usage_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionFetchUsageParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # When specified in conjunction with `group_by`, this parameter filters usage to a # single billable metric. Note that both `group_by` and `billable_metric_id` must # be specified together. @@ -62,6 +65,7 @@ module Orb sig do params( + subscription_id: String, billable_metric_id: T.nilable(String), first_dimension_key: T.nilable(String), first_dimension_value: T.nilable(String), @@ -78,6 +82,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # When specified in conjunction with `group_by`, this parameter filters usage to a # single billable metric. Note that both `group_by` and `billable_metric_id` must # be specified together. @@ -106,6 +111,7 @@ module Orb sig do override.returns( { + subscription_id: String, billable_metric_id: T.nilable(String), first_dimension_key: T.nilable(String), first_dimension_value: T.nilable(String), diff --git a/rbi/orb/models/subscription_price_intervals_params.rbi b/rbi/orb/models/subscription_price_intervals_params.rbi index 5e1b2bd0f..e970bbfc3 100644 --- a/rbi/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/orb/models/subscription_price_intervals_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionPriceIntervalsParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # A list of price intervals to add to the subscription. sig do returns(T.nilable(T::Array[Orb::SubscriptionPriceIntervalsParams::Add])) @@ -92,6 +95,7 @@ module Orb sig do params( + subscription_id: String, add: T::Array[Orb::SubscriptionPriceIntervalsParams::Add::OrHash], add_adjustments: T::Array[ @@ -108,6 +112,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # A list of price intervals to add to the subscription. add: nil, # A list of adjustments to add to the subscription. @@ -130,6 +135,7 @@ module Orb sig do override.returns( { + subscription_id: String, add: T::Array[Orb::SubscriptionPriceIntervalsParams::Add], add_adjustments: T::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment], diff --git a/rbi/orb/models/subscription_redeem_coupon_params.rbi b/rbi/orb/models/subscription_redeem_coupon_params.rbi index 0dbd32fdc..d2d65333e 100644 --- a/rbi/orb/models/subscription_redeem_coupon_params.rbi +++ b/rbi/orb/models/subscription_redeem_coupon_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionRedeemCouponParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + sig do returns(Orb::SubscriptionRedeemCouponParams::ChangeOption::OrSymbol) end @@ -37,6 +40,7 @@ module Orb sig do params( + subscription_id: String, change_option: Orb::SubscriptionRedeemCouponParams::ChangeOption::OrSymbol, allow_invoice_credit_or_void: T.nilable(T::Boolean), @@ -47,6 +51,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, change_option:, # If false, this request will fail if it would void an issued invoice or create a # credit note. Consider using this as a safety mechanism if you do not expect @@ -66,6 +71,7 @@ module Orb sig do override.returns( { + subscription_id: String, change_option: Orb::SubscriptionRedeemCouponParams::ChangeOption::OrSymbol, allow_invoice_credit_or_void: T.nilable(T::Boolean), diff --git a/rbi/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/orb/models/subscription_schedule_plan_change_params.rbi index 90de9c7f6..c3ce458d7 100644 --- a/rbi/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/orb/models/subscription_schedule_plan_change_params.rbi @@ -14,6 +14,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :subscription_id + sig do returns( Orb::SubscriptionSchedulePlanChangeParams::ChangeOption::OrSymbol @@ -208,6 +211,7 @@ module Orb sig do params( + subscription_id: String, change_option: Orb::SubscriptionSchedulePlanChangeParams::ChangeOption::OrSymbol, add_adjustments: @@ -273,6 +277,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, change_option:, # Additional adjustments to be added to the subscription. (Only available for # accounts that have migrated off of legacy subscription overrides) @@ -362,6 +367,7 @@ module Orb sig do override.returns( { + subscription_id: String, change_option: Orb::SubscriptionSchedulePlanChangeParams::ChangeOption::OrSymbol, add_adjustments: diff --git a/rbi/orb/models/subscription_trigger_phase_params.rbi b/rbi/orb/models/subscription_trigger_phase_params.rbi index 1ff4bc038..bd2d8db18 100644 --- a/rbi/orb/models/subscription_trigger_phase_params.rbi +++ b/rbi/orb/models/subscription_trigger_phase_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionTriggerPhaseParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # If false, this request will fail if it would void an issued invoice or create a # credit note. Consider using this as a safety mechanism if you do not expect # existing invoices to be changed. @@ -24,12 +27,14 @@ module Orb sig do params( + subscription_id: String, allow_invoice_credit_or_void: T.nilable(T::Boolean), effective_date: T.nilable(Date), request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + subscription_id:, # If false, this request will fail if it would void an issued invoice or create a # credit note. Consider using this as a safety mechanism if you do not expect # existing invoices to be changed. @@ -44,6 +49,7 @@ module Orb sig do override.returns( { + subscription_id: String, allow_invoice_credit_or_void: T.nilable(T::Boolean), effective_date: T.nilable(Date), request_options: Orb::RequestOptions diff --git a/rbi/orb/models/subscription_unschedule_cancellation_params.rbi b/rbi/orb/models/subscription_unschedule_cancellation_params.rbi index 6df8f37ca..33657c531 100644 --- a/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +++ b/rbi/orb/models/subscription_unschedule_cancellation_params.rbi @@ -14,15 +14,23 @@ module Orb ) end + sig { returns(String) } + attr_accessor :subscription_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + subscription_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(subscription_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { subscription_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi b/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi index e2c8f03bf..d0d267533 100644 --- a/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +++ b/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi @@ -14,17 +14,22 @@ module Orb ) end + sig { returns(String) } + attr_accessor :subscription_id + # Price for which the updates should be cleared. Must be a fixed fee. sig { returns(String) } attr_accessor :price_id sig do params( + subscription_id: String, price_id: String, request_options: Orb::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( + subscription_id:, # Price for which the updates should be cleared. Must be a fixed fee. price_id:, request_options: {} @@ -33,7 +38,11 @@ module Orb sig do override.returns( - { price_id: String, request_options: Orb::RequestOptions } + { + subscription_id: String, + price_id: String, + request_options: Orb::RequestOptions + } ) end def to_hash diff --git a/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi b/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi index d230c6dd8..c1446255e 100644 --- a/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +++ b/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi @@ -14,15 +14,23 @@ module Orb ) end + sig { returns(String) } + attr_accessor :subscription_id + sig do - params(request_options: Orb::RequestOptions::OrHash).returns( - T.attached_class - ) + params( + subscription_id: String, + request_options: Orb::RequestOptions::OrHash + ).returns(T.attached_class) end - def self.new(request_options: {}) + def self.new(subscription_id:, request_options: {}) end - sig { override.returns({ request_options: Orb::RequestOptions }) } + sig do + override.returns( + { subscription_id: String, request_options: Orb::RequestOptions } + ) + end def to_hash end end diff --git a/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi b/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi index b51d10afb..fd677706a 100644 --- a/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +++ b/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi @@ -14,6 +14,9 @@ module Orb ) end + sig { returns(String) } + attr_accessor :subscription_id + # Price for which the quantity should be updated. Must be a fixed fee. sig { returns(String) } attr_accessor :price_id @@ -55,6 +58,7 @@ module Orb sig do params( + subscription_id: String, price_id: String, quantity: Float, allow_invoice_credit_or_void: T.nilable(T::Boolean), @@ -65,6 +69,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # Price for which the quantity should be updated. Must be a fixed fee. price_id:, quantity:, @@ -87,6 +92,7 @@ module Orb sig do override.returns( { + subscription_id: String, price_id: String, quantity: Float, allow_invoice_credit_or_void: T.nilable(T::Boolean), diff --git a/rbi/orb/models/subscription_update_params.rbi b/rbi/orb/models/subscription_update_params.rbi index 7d0c8848b..ed6300c4b 100644 --- a/rbi/orb/models/subscription_update_params.rbi +++ b/rbi/orb/models/subscription_update_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionUpdateParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # Determines whether issued invoices for this subscription will automatically be # charged with the saved payment method on the due date. This property defaults to # the plan's behavior. @@ -43,6 +46,7 @@ module Orb sig do params( + subscription_id: String, auto_collection: T.nilable(T::Boolean), default_invoice_memo: T.nilable(String), invoicing_threshold: T.nilable(String), @@ -52,6 +56,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # Determines whether issued invoices for this subscription will automatically be # charged with the saved payment method on the due date. This property defaults to # the plan's behavior. @@ -79,6 +84,7 @@ module Orb sig do override.returns( { + subscription_id: String, auto_collection: T.nilable(T::Boolean), default_invoice_memo: T.nilable(String), invoicing_threshold: T.nilable(String), diff --git a/rbi/orb/models/subscription_update_trial_params.rbi b/rbi/orb/models/subscription_update_trial_params.rbi index 910197e6a..47b73e113 100644 --- a/rbi/orb/models/subscription_update_trial_params.rbi +++ b/rbi/orb/models/subscription_update_trial_params.rbi @@ -11,6 +11,9 @@ module Orb T.any(Orb::SubscriptionUpdateTrialParams, Orb::Internal::AnyHash) end + sig { returns(String) } + attr_accessor :subscription_id + # The new date that the trial should end, or the literal string `immediate` to end # the trial immediately. sig do @@ -33,6 +36,7 @@ module Orb sig do params( + subscription_id: String, trial_end_date: T.any( Time, @@ -43,6 +47,7 @@ module Orb ).returns(T.attached_class) end def self.new( + subscription_id:, # The new date that the trial should end, or the literal string `immediate` to end # the trial immediately. trial_end_date:, @@ -56,6 +61,7 @@ module Orb sig do override.returns( { + subscription_id: String, trial_end_date: T.any( Time, diff --git a/rbi/orb/resources/alerts.rbi b/rbi/orb/resources/alerts.rbi index b8153039b..bd56b8ffd 100644 --- a/rbi/orb/resources/alerts.rbi +++ b/rbi/orb/resources/alerts.rbi @@ -153,7 +153,9 @@ module Orb subscription_id: String, thresholds: T::Array[Orb::Threshold::OrHash], type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol, + grouping_keys: T.nilable(T::Array[String]), metric_id: T.nilable(String), + pricing_unit_id: T.nilable(String), request_options: Orb::RequestOptions::OrHash ).returns(Orb::Alert) end @@ -163,8 +165,14 @@ module Orb thresholds:, # The type of alert to create. This must be a valid alert type. type:, + # The property keys to group cost alerts by. Only applicable for cost_exceeded + # alerts. + grouping_keys: nil, # The metric to track usage for. metric_id: nil, + # The pricing unit to use for grouped cost alerts. Required when grouping_keys is + # set. + pricing_unit_id: nil, request_options: {} ) end diff --git a/rbi/orb/resources/customers.rbi b/rbi/orb/resources/customers.rbi index dc75087a4..c48ed64ff 100644 --- a/rbi/orb/resources/customers.rbi +++ b/rbi/orb/resources/customers.rbi @@ -324,9 +324,10 @@ module Orb # This endpoint can be used to update the `payment_provider`, # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, - # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and - # `additional_emails` of an existing customer. Other fields on a customer are - # currently immutable. + # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, + # `additional_emails`, and `currency` of an existing customer. `currency` can only + # be set if it has not already been set on the customer. Other fields on a + # customer are currently immutable. sig do params( customer_id: String, @@ -383,8 +384,10 @@ module Orb # will be inherited from the account-level setting. auto_issuance: nil, billing_address: nil, - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. currency: nil, # A valid customer email, to be used for invoicing and notifications. email: nil, @@ -748,8 +751,10 @@ module Orb # will be inherited from the account-level setting. auto_issuance: nil, billing_address: nil, - # An ISO 4217 currency string used for the customer's invoices and balance. If not - # set at creation time, will be set at subscription creation time. + # An ISO 4217 currency string used for the customer's invoices and balance. This + # can only be set if the customer does not already have a currency configured. If + # not set at creation or update time, it will be set at subscription creation + # time. currency: nil, # A valid customer email, to be used for invoicing and notifications. email: nil, diff --git a/rbi/orb/resources/customers/credits/ledger.rbi b/rbi/orb/resources/customers/credits/ledger.rbi index ddb714af4..d71f50da5 100644 --- a/rbi/orb/resources/customers/credits/ledger.rbi +++ b/rbi/orb/resources/customers/credits/ledger.rbi @@ -182,7 +182,9 @@ module Orb # also generate a one-off invoice for the customer for the credits pre-purchase. # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges # on the invoice are calculated by multiplying the cost basis with the number of - # credit units added. + # credit units added. If you invoice or handle payment of credits outside of Orb + # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + # `true` to prevent duplicate invoicing effects. # # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated # and `invoice_settings` must be included @@ -250,79 +252,20 @@ module Orb sig do params( customer_id: String, - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol, - target_expiry_date: Date, - block_id: String, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryParams::Filter::OrHash - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::OrHash - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason::OrSymbol + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void::OrHash, + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment::OrHash ), request_options: Orb::RequestOptions::OrHash ).returns( Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Variants ) end - def create_entry( - customer_id, - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - amount:, - 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. - target_expiry_date:, - # The ID of the block to reverse a decrement from. - block_id:, - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - currency: nil, - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - description: nil, - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - effective_date: nil, - # An ISO 8601 format date that identifies the origination credit block to expire - expiry_date: nil, - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - filters: nil, - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - invoice_settings: 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, - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - per_unit_cost_basis: nil, - # Can only be specified when `entry_type=void`. The reason for the void. - void_reason: nil, - request_options: {} - ) + def create_entry(customer_id, body:, request_options: {}) end # This endpoint allows you to create a new ledger entry for a specified customer's @@ -375,7 +318,9 @@ module Orb # also generate a one-off invoice for the customer for the credits pre-purchase. # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges # on the invoice are calculated by multiplying the cost basis with the number of - # credit units added. + # credit units added. If you invoice or handle payment of credits outside of Orb + # (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to + # `true` to prevent duplicate invoicing effects. # # - if `per_unit_cost_basis` is greater than zero, an invoice will be generated # and `invoice_settings` must be included @@ -443,30 +388,13 @@ module Orb sig do params( external_customer_id: String, - amount: Float, - entry_type: - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol, - target_expiry_date: Date, - block_id: String, - currency: T.nilable(String), - description: T.nilable(String), - effective_date: T.nilable(Time), - expiry_date: T.nilable(Time), - filters: - T.nilable( - T::Array[ - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::OrHash - ] - ), - invoice_settings: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::OrHash - ), - metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]), - per_unit_cost_basis: T.nilable(String), - void_reason: - T.nilable( - Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason::OrSymbol + body: + T.any( + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::OrHash, + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment::OrHash ), request_options: Orb::RequestOptions::OrHash ).returns( @@ -475,45 +403,7 @@ module Orb end def create_entry_by_external_id( external_customer_id, - # The number of credits to effect. Note that this is required for increment, - # decrement or void operations. - amount:, - 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. - target_expiry_date:, - # The ID of the block to reverse a decrement from. - block_id:, - # The currency or custom pricing unit to use for this ledger entry. If this is a - # real-world currency, it must match the customer's invoicing currency. - currency: nil, - # Optional metadata that can be specified when adding ledger results via the API. - # For example, this can be used to note an increment refers to trial credits, or - # for noting corrections as a result of an incident, etc. - description: nil, - # An ISO 8601 format date that denotes when this credit balance should become - # available for use. - effective_date: nil, - # An ISO 8601 format date that identifies the origination credit block to expire - expiry_date: nil, - # Optional filter to specify which items this credit block applies to. If not - # specified, the block will apply to all items for the pricing unit. - filters: nil, - # Passing `invoice_settings` automatically generates an invoice for the newly - # added credits. If `invoice_settings` is passed, you must specify - # per_unit_cost_basis, as the calculation of the invoice total is done on that - # basis. - invoice_settings: 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, - # Can only be specified when entry_type=increment. How much, in the customer's - # currency, a customer paid for a single credit in this block - per_unit_cost_basis: nil, - # Can only be specified when `entry_type=void`. The reason for the void. - void_reason: nil, + body:, request_options: {} ) end diff --git a/rbi/orb/resources/prices.rbi b/rbi/orb/resources/prices.rbi index 77805d105..c2143f9f5 100644 --- a/rbi/orb/resources/prices.rbi +++ b/rbi/orb/resources/prices.rbi @@ -38,195 +38,46 @@ module Orb # specification of different price model configurations possible in this endpoint. sig do params( - cadence: Orb::PriceCreateParams::Cadence::OrSymbol, - currency: String, - item_id: String, - model_type: Orb::PriceCreateParams::ModelType::OrSymbol, - name: String, - unit_config: Orb::UnitConfig::OrHash, - tiered_config: Orb::TieredConfig::OrHash, - bulk_config: Orb::BulkConfig::OrHash, - bulk_with_filters_config: - Orb::PriceCreateParams::BulkWithFiltersConfig::OrHash, - package_config: Orb::PackageConfig::OrHash, - matrix_config: Orb::MatrixConfig::OrHash, - threshold_total_amount_config: - Orb::PriceCreateParams::ThresholdTotalAmountConfig::OrHash, - tiered_package_config: - Orb::PriceCreateParams::TieredPackageConfig::OrHash, - tiered_with_minimum_config: - Orb::PriceCreateParams::TieredWithMinimumConfig::OrHash, - grouped_tiered_config: - Orb::PriceCreateParams::GroupedTieredConfig::OrHash, - tiered_package_with_minimum_config: - Orb::PriceCreateParams::TieredPackageWithMinimumConfig::OrHash, - package_with_allocation_config: - Orb::PriceCreateParams::PackageWithAllocationConfig::OrHash, - unit_with_percent_config: - Orb::PriceCreateParams::UnitWithPercentConfig::OrHash, - matrix_with_allocation_config: - Orb::MatrixWithAllocationConfig::OrHash, - tiered_with_proration_config: - Orb::PriceCreateParams::TieredWithProrationConfig::OrHash, - unit_with_proration_config: - Orb::PriceCreateParams::UnitWithProrationConfig::OrHash, - grouped_allocation_config: - Orb::PriceCreateParams::GroupedAllocationConfig::OrHash, - bulk_with_proration_config: - Orb::PriceCreateParams::BulkWithProrationConfig::OrHash, - grouped_with_prorated_minimum_config: - Orb::PriceCreateParams::GroupedWithProratedMinimumConfig::OrHash, - grouped_with_metered_minimum_config: - Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::OrHash, - grouped_with_min_max_thresholds_config: - Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig::OrHash, - matrix_with_display_name_config: - Orb::PriceCreateParams::MatrixWithDisplayNameConfig::OrHash, - grouped_tiered_package_config: - Orb::PriceCreateParams::GroupedTieredPackageConfig::OrHash, - max_group_tiered_package_config: - Orb::PriceCreateParams::MaxGroupTieredPackageConfig::OrHash, - scalable_matrix_with_unit_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::OrHash, - scalable_matrix_with_tiered_pricing_config: - Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::OrHash, - cumulative_grouped_bulk_config: - Orb::PriceCreateParams::CumulativeGroupedBulkConfig::OrHash, - cumulative_grouped_allocation_config: - Orb::PriceCreateParams::CumulativeGroupedAllocationConfig::OrHash, - minimum_composite_config: - Orb::PriceCreateParams::MinimumCompositeConfig::OrHash, - percent_config: Orb::PriceCreateParams::PercentConfig::OrHash, - event_output_config: - Orb::PriceCreateParams::EventOutputConfig::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 - ) + body: + T.any( + Orb::NewFloatingUnitPrice::OrHash, + Orb::NewFloatingTieredPrice::OrHash, + Orb::NewFloatingBulkPrice::OrHash, + Orb::PriceCreateParams::Body::BulkWithFilters::OrHash, + Orb::NewFloatingPackagePrice::OrHash, + Orb::NewFloatingMatrixPrice::OrHash, + Orb::NewFloatingThresholdTotalAmountPrice::OrHash, + Orb::NewFloatingTieredPackagePrice::OrHash, + Orb::NewFloatingTieredWithMinimumPrice::OrHash, + Orb::NewFloatingGroupedTieredPrice::OrHash, + Orb::NewFloatingTieredPackageWithMinimumPrice::OrHash, + Orb::NewFloatingPackageWithAllocationPrice::OrHash, + Orb::NewFloatingUnitWithPercentPrice::OrHash, + Orb::NewFloatingMatrixWithAllocationPrice::OrHash, + Orb::NewFloatingTieredWithProrationPrice::OrHash, + Orb::NewFloatingUnitWithProrationPrice::OrHash, + Orb::NewFloatingGroupedAllocationPrice::OrHash, + Orb::NewFloatingBulkWithProrationPrice::OrHash, + Orb::NewFloatingGroupedWithProratedMinimumPrice::OrHash, + Orb::NewFloatingGroupedWithMeteredMinimumPrice::OrHash, + Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::OrHash, + Orb::NewFloatingMatrixWithDisplayNamePrice::OrHash, + Orb::NewFloatingGroupedTieredPackagePrice::OrHash, + Orb::NewFloatingMaxGroupTieredPackagePrice::OrHash, + Orb::NewFloatingScalableMatrixWithUnitPricingPrice::OrHash, + Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash, + Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash, + Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash, + Orb::NewFloatingMinimumCompositePrice::OrHash, + Orb::PriceCreateParams::Body::Percent::OrHash, + Orb::PriceCreateParams::Body::EventOutput::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)]), request_options: Orb::RequestOptions::OrHash ).returns(Orb::Price::Variants) end def create( - # 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:, - # The pricing model type - model_type:, - # The name of the price. - name:, - # Configuration for unit pricing - unit_config:, - # Configuration for tiered pricing - tiered_config:, - # Configuration for bulk pricing - bulk_config:, - # Configuration for bulk_with_filters pricing - bulk_with_filters_config:, - # Configuration for package pricing - package_config:, - # Configuration for matrix pricing - matrix_config:, - # Configuration for threshold_total_amount pricing - threshold_total_amount_config:, - # Configuration for tiered_package pricing - tiered_package_config:, - # Configuration for tiered_with_minimum pricing - tiered_with_minimum_config:, - # Configuration for grouped_tiered pricing - grouped_tiered_config:, - # Configuration for tiered_package_with_minimum pricing - tiered_package_with_minimum_config:, - # Configuration for package_with_allocation pricing - package_with_allocation_config:, - # Configuration for unit_with_percent pricing - unit_with_percent_config:, - # Configuration for matrix_with_allocation pricing - matrix_with_allocation_config:, - # Configuration for tiered_with_proration pricing - tiered_with_proration_config:, - # Configuration for unit_with_proration pricing - unit_with_proration_config:, - # Configuration for grouped_allocation pricing - grouped_allocation_config:, - # Configuration for bulk_with_proration pricing - bulk_with_proration_config:, - # Configuration for grouped_with_prorated_minimum pricing - grouped_with_prorated_minimum_config:, - # Configuration for grouped_with_metered_minimum pricing - grouped_with_metered_minimum_config:, - # Configuration for grouped_with_min_max_thresholds pricing - grouped_with_min_max_thresholds_config:, - # Configuration for matrix_with_display_name pricing - matrix_with_display_name_config:, - # Configuration for grouped_tiered_package pricing - grouped_tiered_package_config:, - # Configuration for max_group_tiered_package pricing - max_group_tiered_package_config:, - # Configuration for scalable_matrix_with_unit_pricing pricing - scalable_matrix_with_unit_pricing_config:, - # Configuration for scalable_matrix_with_tiered_pricing pricing - scalable_matrix_with_tiered_pricing_config:, - # Configuration for cumulative_grouped_bulk pricing - cumulative_grouped_bulk_config:, - # Configuration for cumulative_grouped_allocation pricing - cumulative_grouped_allocation_config:, - # Configuration for minimum_composite pricing - minimum_composite_config:, - # Configuration for percent pricing - percent_config:, - # Configuration for event_output pricing - event_output_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, - # 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, + # New floating price request body params. + body:, request_options: {} ) end diff --git a/scripts/mock b/scripts/mock index 0b28f6ea2..3d1d19c19 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,23 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + # Pre-install the package so the download doesn't eat into the startup timeout + npm exec --package=@stdy/cli@0.19.3 -- steady --version - # Wait for server to come online + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" &> .stdy.log & + + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + attempts=0 + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi + attempts=$((attempts + 1)) + if [ "$attempts" -ge 300 ]; then + echo + echo "Timed out waiting for Steady server to start" + cat .stdy.log + exit 1 + fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets "$URL" fi diff --git a/scripts/test b/scripts/test index e0dc13741..41db042e1 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi diff --git a/sig/orb/client.rbs b/sig/orb/client.rbs index 6f154c936..666e446b6 100644 --- a/sig/orb/client.rbs +++ b/sig/orb/client.rbs @@ -10,6 +10,8 @@ module Orb attr_reader api_key: String + attr_reader webhook_secret: String? + attr_reader top_level: Orb::Resources::TopLevel attr_reader beta: Orb::Resources::Beta @@ -52,6 +54,7 @@ module Orb def initialize: ( ?api_key: String?, + ?webhook_secret: String?, ?base_url: String?, ?max_retries: Integer, ?timeout: Float, diff --git a/sig/orb/models/alert.rbs b/sig/orb/models/alert.rbs index 47192cfbd..3f5fe7d86 100644 --- a/sig/orb/models/alert.rbs +++ b/sig/orb/models/alert.rbs @@ -13,6 +13,7 @@ module Orb thresholds: ::Array[Orb::Threshold]?, type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, + grouping_keys: ::Array[String]?, license_type: Orb::Alert::LicenseType? } @@ -39,6 +40,8 @@ module Orb attr_accessor balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]? + attr_accessor grouping_keys: ::Array[String]? + attr_accessor license_type: Orb::Alert::LicenseType? def initialize: ( @@ -53,6 +56,7 @@ module Orb thresholds: ::Array[Orb::Threshold]?, type: Orb::Models::Alert::type_, ?balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, + ?grouping_keys: ::Array[String]?, ?license_type: Orb::Alert::LicenseType? ) -> void @@ -68,6 +72,7 @@ module Orb thresholds: ::Array[Orb::Threshold]?, type: Orb::Models::Alert::type_, balance_alert_status: ::Array[Orb::Alert::BalanceAlertStatus]?, + grouping_keys: ::Array[String]?, license_type: Orb::Alert::LicenseType? } diff --git a/sig/orb/models/alert_create_for_customer_params.rbs b/sig/orb/models/alert_create_for_customer_params.rbs index ca8dd5eea..a655a7a80 100644 --- a/sig/orb/models/alert_create_for_customer_params.rbs +++ b/sig/orb/models/alert_create_for_customer_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type alert_create_for_customer_params = { + customer_id: String, currency: String, type: Orb::Models::AlertCreateForCustomerParams::type_, thresholds: ::Array[Orb::Threshold]? @@ -12,6 +13,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor currency: String attr_accessor type: Orb::Models::AlertCreateForCustomerParams::type_ @@ -19,6 +22,7 @@ module Orb attr_accessor thresholds: ::Array[Orb::Threshold]? def initialize: ( + customer_id: String, currency: String, type: Orb::Models::AlertCreateForCustomerParams::type_, ?thresholds: ::Array[Orb::Threshold]?, @@ -26,6 +30,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, currency: String, type: Orb::Models::AlertCreateForCustomerParams::type_, thresholds: ::Array[Orb::Threshold]?, diff --git a/sig/orb/models/alert_create_for_external_customer_params.rbs b/sig/orb/models/alert_create_for_external_customer_params.rbs index ed1542ee5..fc10f4f7f 100644 --- a/sig/orb/models/alert_create_for_external_customer_params.rbs +++ b/sig/orb/models/alert_create_for_external_customer_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type alert_create_for_external_customer_params = { + external_customer_id: String, currency: String, type: Orb::Models::AlertCreateForExternalCustomerParams::type_, thresholds: ::Array[Orb::Threshold]? @@ -12,6 +13,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor currency: String attr_accessor type: Orb::Models::AlertCreateForExternalCustomerParams::type_ @@ -19,6 +22,7 @@ module Orb attr_accessor thresholds: ::Array[Orb::Threshold]? def initialize: ( + external_customer_id: String, currency: String, type: Orb::Models::AlertCreateForExternalCustomerParams::type_, ?thresholds: ::Array[Orb::Threshold]?, @@ -26,6 +30,7 @@ module Orb ) -> void def to_hash: -> { + external_customer_id: String, currency: String, type: Orb::Models::AlertCreateForExternalCustomerParams::type_, thresholds: ::Array[Orb::Threshold]?, diff --git a/sig/orb/models/alert_create_for_subscription_params.rbs b/sig/orb/models/alert_create_for_subscription_params.rbs index b7fa115ea..cbd8c259b 100644 --- a/sig/orb/models/alert_create_for_subscription_params.rbs +++ b/sig/orb/models/alert_create_for_subscription_params.rbs @@ -2,9 +2,12 @@ module Orb module Models type alert_create_for_subscription_params = { + subscription_id: String, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, - metric_id: String? + grouping_keys: ::Array[String]?, + metric_id: String?, + pricing_unit_id: String? } & Orb::Internal::Type::request_parameters @@ -12,23 +15,35 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor thresholds: ::Array[Orb::Threshold] attr_accessor type: Orb::Models::AlertCreateForSubscriptionParams::type_ + attr_accessor grouping_keys: ::Array[String]? + attr_accessor metric_id: String? + attr_accessor pricing_unit_id: String? + def initialize: ( + subscription_id: String, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, + ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?pricing_unit_id: String?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + subscription_id: String, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, + grouping_keys: ::Array[String]?, metric_id: String?, + pricing_unit_id: String?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/alert_disable_params.rbs b/sig/orb/models/alert_disable_params.rbs index b4dd9a954..46e9bf654 100644 --- a/sig/orb/models/alert_disable_params.rbs +++ b/sig/orb/models/alert_disable_params.rbs @@ -1,20 +1,25 @@ module Orb module Models type alert_disable_params = - { subscription_id: String? } & Orb::Internal::Type::request_parameters + { alert_configuration_id: String, subscription_id: String? } + & Orb::Internal::Type::request_parameters class AlertDisableParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor alert_configuration_id: String + attr_accessor subscription_id: String? def initialize: ( + alert_configuration_id: String, ?subscription_id: String?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + alert_configuration_id: String, subscription_id: String?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/alert_enable_params.rbs b/sig/orb/models/alert_enable_params.rbs index 75cac38a4..71d4ed720 100644 --- a/sig/orb/models/alert_enable_params.rbs +++ b/sig/orb/models/alert_enable_params.rbs @@ -1,20 +1,25 @@ module Orb module Models type alert_enable_params = - { subscription_id: String? } & Orb::Internal::Type::request_parameters + { alert_configuration_id: String, subscription_id: String? } + & Orb::Internal::Type::request_parameters class AlertEnableParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor alert_configuration_id: String + attr_accessor subscription_id: String? def initialize: ( + alert_configuration_id: String, ?subscription_id: String?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + alert_configuration_id: String, subscription_id: String?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/alert_retrieve_params.rbs b/sig/orb/models/alert_retrieve_params.rbs index d708e16f3..b0ad14bd2 100644 --- a/sig/orb/models/alert_retrieve_params.rbs +++ b/sig/orb/models/alert_retrieve_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type alert_retrieve_params = { } & Orb::Internal::Type::request_parameters + type alert_retrieve_params = + { alert_id: String } & Orb::Internal::Type::request_parameters class AlertRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor alert_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + alert_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { alert_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/alert_update_params.rbs b/sig/orb/models/alert_update_params.rbs index 35643e917..8814a0279 100644 --- a/sig/orb/models/alert_update_params.rbs +++ b/sig/orb/models/alert_update_params.rbs @@ -1,21 +1,25 @@ module Orb module Models type alert_update_params = - { thresholds: ::Array[Orb::Threshold] } + { alert_configuration_id: String, thresholds: ::Array[Orb::Threshold] } & Orb::Internal::Type::request_parameters class AlertUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor alert_configuration_id: String + attr_accessor thresholds: ::Array[Orb::Threshold] def initialize: ( + alert_configuration_id: String, thresholds: ::Array[Orb::Threshold], ?request_options: Orb::request_opts ) -> void def to_hash: -> { + alert_configuration_id: String, thresholds: ::Array[Orb::Threshold], request_options: Orb::RequestOptions } 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 fcdb6473e..54aba4612 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 @@ -3,6 +3,7 @@ module Orb module Beta type external_plan_id_create_plan_version_params = { + external_plan_id: String, version: Integer, add_adjustments: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment]?, add_prices: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice]?, @@ -18,6 +19,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_plan_id: String + attr_accessor version: Integer attr_accessor add_adjustments: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment]? @@ -35,6 +38,7 @@ module Orb attr_accessor set_as_default: bool? def initialize: ( + external_plan_id: String, version: Integer, ?add_adjustments: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment]?, ?add_prices: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice]?, @@ -47,6 +51,7 @@ module Orb ) -> void def to_hash: -> { + external_plan_id: String, version: Integer, add_adjustments: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddAdjustment]?, add_prices: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice]?, @@ -96,6 +101,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } @@ -103,70 +109,75 @@ 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 plan_phase_order: Integer? attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::license_allocation_price?, ?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?, plan_phase_order: Integer?, price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::price? } - 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 + 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 bulk_with_filters = + type unit = { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, item_id: String, - model_type: :bulk_with_filters, + 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::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -178,17 +189,19 @@ module Orb 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 + class Unit < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + 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? @@ -197,7 +210,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? attr_accessor currency: String? @@ -218,15 +231,16 @@ module Orb 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, + 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::Price::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -236,20 +250,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :unit ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, item_id: String, - model_type: :bulk_with_filters, + 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::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -261,64 +276,6 @@ module Orb 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 @@ -337,22 +294,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] + 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_with_proration = + type tiered = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, item_id: String, - model_type: :tiered_with_proration, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + model_type: :tiered, name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -364,16 +345,18 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence + class Tiered < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] + + attr_accessor model_type: :tiered attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor tiered_config: Orb::TieredConfig attr_accessor billable_metric_id: String? @@ -383,7 +366,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? attr_accessor currency: String? @@ -404,15 +387,16 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + 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_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -422,20 +406,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :tiered ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, item_id: String, - model_type: :tiered_with_proration, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + model_type: :tiered, name: String, - tiered_with_proration_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -465,57 +450,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] end - type tiered_with_proration_config = - { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? def initialize: ( - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + amount: String, + currency: String, + write_off_overage: bool? } - - 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 = + type bulk = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + bulk_config: Orb::BulkConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, item_id: String, - model_type: :grouped_with_min_max_thresholds, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -527,14 +501,16 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence + class Bulk < Orb::Internal::Type::BaseModel + attr_accessor bulk_config: Orb::BulkConfig - attr_accessor grouped_with_min_max_thresholds_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] + + attr_accessor model_type: :bulk attr_accessor name: String @@ -546,7 +522,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? attr_accessor currency: String? @@ -567,15 +543,16 @@ module Orb 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, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -585,20 +562,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :bulk ) -> 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, + bulk_config: Orb::BulkConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, item_id: String, - model_type: :grouped_with_min_max_thresholds, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -628,54 +606,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor maximum_charge: String + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor minimum_charge: String + attr_accessor currency: String - attr_accessor per_unit_rate: String + attr_accessor write_off_overage: bool? def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: bool? } end end - type cumulative_grouped_allocation = + type bulk_with_filters = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -687,14 +657,16 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] + + attr_accessor model_type: :bulk_with_filters attr_accessor name: String @@ -706,7 +678,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -727,15 +699,16 @@ module Orb 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, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -745,20 +718,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -770,72 +744,11865 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom + 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] + } - module Cadence - extend Orb::Internal::Type::Enum + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual + 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 + + 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 + + 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? + } + + 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 + + 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? + } + + class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel + attr_accessor first_dimension: String + + attr_accessor matrix_scaling_factors: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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::Beta::ExternalPlanIDCreatePlanVersionParams::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 + + 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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], + model_type: :scalable_matrix_with_tiered_pricing, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], + model_type: :scalable_matrix_with_tiered_pricing, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], + tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] + + attr_accessor tiers: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + + attr_accessor second_dimension: String? + + 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? + ) -> 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? + } + + 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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence + + attr_accessor cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + + 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 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::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] + end + + type cumulative_grouped_bulk_config = + { + dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String + } + + class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] + + attr_accessor group: String + + def initialize: ( + dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + + 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 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::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + 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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::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 + + 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] + + attr_accessor minimum_composite_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor group_allocation: String + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor grouping_key: String + attr_accessor currency: String - attr_accessor unit_amount: String + attr_accessor write_off_overage: bool? def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + 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::Price::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -848,15 +12615,17 @@ module Orb } class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::Percent::PercentConfig + attr_accessor percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -866,7 +12635,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config? attr_accessor currency: String? @@ -887,15 +12656,16 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, item_id: String, + license_allocations: ::Array[Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], name: String, - percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -909,16 +12679,17 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -948,7 +12719,30 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::Percent::cadence] + 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? + } end type percent_config = { percent: Float } @@ -964,16 +12758,17 @@ module Orb type event_output = { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -986,12 +12781,14 @@ module Orb } class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence + attr_accessor cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence - attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + attr_accessor event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 @@ -1004,7 +12801,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1025,15 +12822,16 @@ module Orb 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, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1047,16 +12845,17 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1086,7 +12885,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] end type event_output_config = @@ -1115,113 +12914,33 @@ module Orb 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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor plan_phase_order: Integer? + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - def initialize: ( - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void + attr_accessor currency: String - def to_hash: -> { - adjustment: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } + attr_accessor write_off_overage: bool? - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - module Adjustment - extend Orb::Internal::Type::Union + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end + end - def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplaceAdjustment::adjustment] + def self?.variants: -> ::Array[Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::license_allocation_price] end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - 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 plan_phase_order: Integer? - - attr_accessor price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - plan_phase_order: Integer?, - price: Orb::Models::Beta::ExternalPlanIDCreatePlanVersionParams::ReplacePrice::price? - } type price = Orb::NewPlanUnitPrice diff --git a/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs index 7b4f438f4..dd63dca17 100644 --- a/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs @@ -2,7 +2,8 @@ module Orb module Models module Beta type external_plan_id_fetch_plan_version_params = - { external_plan_id: String } & Orb::Internal::Type::request_parameters + { external_plan_id: String, version: String } + & Orb::Internal::Type::request_parameters class ExternalPlanIDFetchPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -10,13 +11,17 @@ module Orb attr_accessor external_plan_id: String + attr_accessor version: String + def initialize: ( external_plan_id: String, + version: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { external_plan_id: String, + version: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs b/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs index b8d88f4c1..dac847d85 100644 --- a/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +++ b/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs @@ -2,20 +2,25 @@ module Orb module Models module Beta type external_plan_id_set_default_plan_version_params = - { version: Integer } & Orb::Internal::Type::request_parameters + { external_plan_id: String, version: Integer } + & Orb::Internal::Type::request_parameters class ExternalPlanIDSetDefaultPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_plan_id: String + attr_accessor version: Integer def initialize: ( + external_plan_id: String, version: Integer, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + external_plan_id: String, version: Integer, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/beta_create_plan_version_params.rbs b/sig/orb/models/beta_create_plan_version_params.rbs index 278345589..bc5e956ff 100644 --- a/sig/orb/models/beta_create_plan_version_params.rbs +++ b/sig/orb/models/beta_create_plan_version_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type beta_create_plan_version_params = { + plan_id: String, version: Integer, add_adjustments: ::Array[Orb::BetaCreatePlanVersionParams::AddAdjustment]?, add_prices: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice]?, @@ -17,6 +18,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor plan_id: String + attr_accessor version: Integer attr_accessor add_adjustments: ::Array[Orb::BetaCreatePlanVersionParams::AddAdjustment]? @@ -34,6 +37,7 @@ module Orb attr_accessor set_as_default: bool? def initialize: ( + plan_id: String, version: Integer, ?add_adjustments: ::Array[Orb::BetaCreatePlanVersionParams::AddAdjustment]?, ?add_prices: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice]?, @@ -46,6 +50,7 @@ module Orb ) -> void def to_hash: -> { + plan_id: String, version: Integer, add_adjustments: ::Array[Orb::BetaCreatePlanVersionParams::AddAdjustment]?, add_prices: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice]?, @@ -95,6 +100,7 @@ module Orb type add_price = { allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } @@ -102,70 +108,75 @@ 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 plan_phase_order: Integer? attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::license_allocation_price?, ?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?, plan_phase_order: Integer?, price: Orb::Models::BetaCreatePlanVersionParams::AddPrice::price? } - 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 + 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 bulk_with_filters = + type unit = { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, item_id: String, - model_type: :bulk_with_filters, + 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::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -177,17 +188,19 @@ module Orb 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 + class Unit < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence attr_accessor item_id: String - attr_accessor model_type: :bulk_with_filters + 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? @@ -196,7 +209,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config? attr_accessor currency: String? @@ -217,15 +230,16 @@ module Orb 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, + 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::Price::BulkWithFilters::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -235,20 +249,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :bulk_with_filters + ?model_type: :unit ) -> void def to_hash: -> { - bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::BulkWithFiltersConfig, - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::cadence, item_id: String, - model_type: :bulk_with_filters, + 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::Price::BulkWithFilters::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Unit::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -260,61 +275,6 @@ module Orb 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 @@ -333,22 +293,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::BulkWithFilters::cadence] + 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_with_proration = + type tiered = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, item_id: String, - model_type: :tiered_with_proration, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + model_type: :tiered, name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -360,16 +344,18 @@ module Orb reference_id: String? } - class TieredWithProration < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence + class Tiered < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence attr_accessor item_id: String - attr_accessor model_type: :tiered_with_proration + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation] + + attr_accessor model_type: :tiered attr_accessor name: String - attr_accessor tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig + attr_accessor tiered_config: Orb::TieredConfig attr_accessor billable_metric_id: String? @@ -379,7 +365,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config? attr_accessor currency: String? @@ -400,15 +386,16 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -418,20 +405,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :tiered_with_proration + ?model_type: :tiered ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence, item_id: String, - model_type: :tiered_with_proration, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::LicenseAllocation], + model_type: :tiered, name: String, - tiered_with_proration_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig, + 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::Price::TieredWithProration::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -461,57 +449,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Tiered::cadence] end - type tiered_with_proration_config = - { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] - } + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String + + attr_accessor currency: String + + attr_accessor write_off_overage: bool? def initialize: ( - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::Price::TieredWithProration::TieredWithProrationConfig::Tier] + amount: String, + currency: String, + write_off_overage: bool? } - - 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 = + type bulk = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + bulk_config: Orb::BulkConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, item_id: String, - model_type: :grouped_with_min_max_thresholds, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -523,14 +500,16 @@ module Orb reference_id: String? } - class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence + class Bulk < Orb::Internal::Type::BaseModel + attr_accessor bulk_config: Orb::BulkConfig - attr_accessor grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence attr_accessor item_id: String - attr_accessor model_type: :grouped_with_min_max_thresholds + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::LicenseAllocation] + + attr_accessor model_type: :bulk attr_accessor name: String @@ -542,7 +521,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config? attr_accessor currency: String? @@ -563,15 +542,16 @@ module Orb 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, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -581,20 +561,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :grouped_with_min_max_thresholds + ?model_type: :bulk ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence, - grouped_with_min_max_thresholds_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig, + bulk_config: Orb::BulkConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::cadence, item_id: String, - model_type: :grouped_with_min_max_thresholds, + 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::Price::GroupedWithMinMaxThresholds::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -624,54 +605,46 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::GroupedWithMinMaxThresholds::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::Bulk::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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor maximum_charge: String + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor minimum_charge: String + attr_accessor currency: String - attr_accessor per_unit_rate: String + attr_accessor write_off_overage: bool? def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String + amount: String, + currency: String, + write_off_overage: bool? } end end - type cumulative_grouped_allocation = + type bulk_with_filters = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -683,14 +656,16 @@ module Orb reference_id: String? } - class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig - attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence attr_accessor item_id: String - attr_accessor model_type: :cumulative_grouped_allocation + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::LicenseAllocation] + + attr_accessor model_type: :bulk_with_filters attr_accessor name: String @@ -702,7 +677,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config? attr_accessor currency: String? @@ -723,15 +698,16 @@ module Orb 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, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -741,20 +717,21 @@ module Orb ?license_type_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?reference_id: String?, - ?model_type: :cumulative_grouped_allocation + ?model_type: :bulk_with_filters ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::cadence, - cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + bulk_with_filters_config: Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::cadence, item_id: String, - model_type: :cumulative_grouped_allocation, + 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::Price::CumulativeGroupedAllocation::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -766,72 +743,11845 @@ module Orb reference_id: String? } - type cadence = - :annual - | :semi_annual - | :monthly - | :quarterly - | :one_time - | :custom + type bulk_with_filters_config = + { + filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - module Cadence - extend Orb::Internal::Type::Enum + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::BetaCreatePlanVersionParams::AddPrice::LicenseAllocationPrice::BulkWithFilters::BulkWithFiltersConfig::Filter] - ANNUAL: :annual - SEMI_ANNUAL: :semi_annual - MONTHLY: :monthly - QUARTERLY: :quarterly - ONE_TIME: :one_time + 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 + + 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::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::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + + def initialize: ( + grouping_key: String, + package_size: String, + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MaxGroupTieredPackage::MaxGroupTieredPackageConfig::Tier] + ) -> void + + def to_hash: -> { + grouping_key: String, + package_size: String, + tiers: ::Array[Orb::BetaCreatePlanVersionParams::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 + + def to_hash: -> { + tier_lower_bound: String, + unit_amount: String + } + end + end + 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? + + 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::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 + ) -> 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 + + 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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], + model_type: :scalable_matrix_with_tiered_pricing, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::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 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? + + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? + + attr_accessor conversion_rate: Float? + + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::cadence, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::LicenseAllocation], + model_type: :scalable_matrix_with_tiered_pricing, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], + tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] + + attr_accessor tiers: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::ScalableMatrixWithTieredPricing::ScalableMatrixWithTieredPricingConfig::Tier] + + attr_accessor second_dimension: String? + + 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? + ) -> 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? + } + + 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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence + + attr_accessor cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig + + 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 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::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence, + cumulative_grouped_bulk_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::cadence] + end + + type cumulative_grouped_bulk_config = + { + dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String + } + + class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel + attr_accessor dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue] + + attr_accessor group: String + + def initialize: ( + dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedBulk::CumulativeGroupedBulkConfig::DimensionValue], + group: String + ) -> void + + def to_hash: -> { + dimension_values: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence + + attr_accessor cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig + + 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 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::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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + 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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::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 + + 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence + + attr_accessor item_id: String + + attr_accessor license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::LicenseAllocation] + + attr_accessor minimum_composite_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::ReplacePrice::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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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?, + ?currency: String?, + ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + ?external_price_id: String?, + ?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::ReplacePrice::LicenseAllocationPrice::MinimumComposite::cadence, + 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, + 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?, + currency: String?, + dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, + external_price_id: String?, + 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] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::MinimumComposite::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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor group_allocation: String + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - attr_accessor grouping_key: String + attr_accessor currency: String - attr_accessor unit_amount: String + attr_accessor write_off_overage: bool? def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + amount: String, + currency: String, + ?write_off_overage: bool? ) -> void def to_hash: -> { - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String + 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::Price::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -844,15 +12594,17 @@ module Orb } class Percent < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::Percent::PercentConfig + attr_accessor percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::PercentConfig attr_accessor billable_metric_id: String? @@ -862,7 +12614,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config? attr_accessor currency: String? @@ -883,15 +12635,16 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -905,16 +12658,17 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::cadence, item_id: String, + license_allocations: ::Array[Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::LicenseAllocation], model_type: :percent, name: String, - percent_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::Percent::PercentConfig, + percent_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::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::Price::Percent::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::Percent::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -944,7 +12698,30 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::Percent::cadence] + 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? + } end type percent_config = { percent: Float } @@ -960,16 +12737,17 @@ module Orb type event_output = { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -982,12 +12760,14 @@ module Orb } class EventOutput < Orb::Internal::Type::BaseModel - attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence + attr_accessor cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence - attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig + attr_accessor event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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 @@ -1000,7 +12780,7 @@ module Orb attr_accessor conversion_rate: Float? - attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::conversion_rate_config? + attr_accessor conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config? attr_accessor currency: String? @@ -1021,15 +12801,16 @@ module Orb attr_accessor reference_id: String? def initialize: ( - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + ?conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, ?currency: String?, ?dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, ?external_price_id: String?, @@ -1043,16 +12824,17 @@ module Orb ) -> void def to_hash: -> { - cadence: Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence, - event_output_config: Orb::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::EventOutputConfig, + cadence: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence, + event_output_config: Orb::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::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::AddPrice::Price::EventOutput::conversion_rate_config?, + conversion_rate_config: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::conversion_rate_config?, currency: String?, dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration?, external_price_id: String?, @@ -1082,7 +12864,7 @@ module Orb ONE_TIME: :one_time CUSTOM: :custom - def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::AddPrice::Price::EventOutput::cadence] + def self?.values: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::LicenseAllocationPrice::EventOutput::cadence] end type event_output_config = @@ -1111,110 +12893,33 @@ module Orb 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 + type license_allocation = + { amount: String, currency: String, write_off_overage: bool? } - attr_accessor plan_phase_order: Integer? + class LicenseAllocation < Orb::Internal::Type::BaseModel + attr_accessor amount: String - def initialize: ( - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - ?plan_phase_order: Integer? - ) -> void + attr_accessor currency: String - def to_hash: -> { - adjustment: Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment, - replaces_adjustment_id: String, - plan_phase_order: Integer? - } + attr_accessor write_off_overage: bool? - type adjustment = - Orb::NewPercentageDiscount - | Orb::NewUsageDiscount - | Orb::NewAmountDiscount - | Orb::NewMinimum - | Orb::NewMaximum + def initialize: ( + amount: String, + currency: String, + ?write_off_overage: bool? + ) -> void - module Adjustment - extend Orb::Internal::Type::Union + def to_hash: -> { + amount: String, + currency: String, + write_off_overage: bool? + } + end + end - def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplaceAdjustment::adjustment] + def self?.variants: -> ::Array[Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::license_allocation_price] end - end - - type replace_price = - { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - 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 plan_phase_order: Integer? - - attr_accessor price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - - def initialize: ( - replaces_price_id: String, - ?allocation_price: Orb::NewAllocationPrice?, - ?plan_phase_order: Integer?, - ?price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - ) -> void - - def to_hash: -> { - replaces_price_id: String, - allocation_price: Orb::NewAllocationPrice?, - plan_phase_order: Integer?, - price: Orb::Models::BetaCreatePlanVersionParams::ReplacePrice::price? - } type price = Orb::NewPlanUnitPrice diff --git a/sig/orb/models/beta_fetch_plan_version_params.rbs b/sig/orb/models/beta_fetch_plan_version_params.rbs index 6578ef4ef..04ec64696 100644 --- a/sig/orb/models/beta_fetch_plan_version_params.rbs +++ b/sig/orb/models/beta_fetch_plan_version_params.rbs @@ -1,7 +1,8 @@ module Orb module Models type beta_fetch_plan_version_params = - { plan_id: String } & Orb::Internal::Type::request_parameters + { plan_id: String, version: String } + & Orb::Internal::Type::request_parameters class BetaFetchPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -9,12 +10,19 @@ module Orb attr_accessor plan_id: String + attr_accessor version: String + def initialize: ( plan_id: String, + version: String, ?request_options: Orb::request_opts ) -> void - def to_hash: -> { plan_id: String, request_options: Orb::RequestOptions } + def to_hash: -> { + plan_id: String, + version: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/beta_set_default_plan_version_params.rbs b/sig/orb/models/beta_set_default_plan_version_params.rbs index 86f6a193c..ec620f101 100644 --- a/sig/orb/models/beta_set_default_plan_version_params.rbs +++ b/sig/orb/models/beta_set_default_plan_version_params.rbs @@ -1,20 +1,28 @@ module Orb module Models type beta_set_default_plan_version_params = - { version: Integer } & Orb::Internal::Type::request_parameters + { plan_id: String, version: Integer } + & Orb::Internal::Type::request_parameters class BetaSetDefaultPlanVersionParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor plan_id: String + attr_accessor version: Integer def initialize: ( + plan_id: String, version: Integer, ?request_options: Orb::request_opts ) -> void - def to_hash: -> { version: Integer, request_options: Orb::RequestOptions } + def to_hash: -> { + plan_id: String, + version: Integer, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/coupon_archive_params.rbs b/sig/orb/models/coupon_archive_params.rbs index 76e33a284..a8ab45acd 100644 --- a/sig/orb/models/coupon_archive_params.rbs +++ b/sig/orb/models/coupon_archive_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type coupon_archive_params = { } & Orb::Internal::Type::request_parameters + type coupon_archive_params = + { coupon_id: String } & Orb::Internal::Type::request_parameters class CouponArchiveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor coupon_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + coupon_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + coupon_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/coupon_fetch_params.rbs b/sig/orb/models/coupon_fetch_params.rbs index 611ae6a02..85f2813ab 100644 --- a/sig/orb/models/coupon_fetch_params.rbs +++ b/sig/orb/models/coupon_fetch_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type coupon_fetch_params = { } & Orb::Internal::Type::request_parameters + type coupon_fetch_params = + { coupon_id: String } & Orb::Internal::Type::request_parameters class CouponFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor coupon_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + coupon_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + coupon_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/coupons/subscription_list_params.rbs b/sig/orb/models/coupons/subscription_list_params.rbs index f28700fe5..a66ccb37d 100644 --- a/sig/orb/models/coupons/subscription_list_params.rbs +++ b/sig/orb/models/coupons/subscription_list_params.rbs @@ -2,13 +2,15 @@ module Orb module Models module Coupons type subscription_list_params = - { cursor: String?, limit: Integer } + { coupon_id: String, cursor: String?, limit: Integer } & Orb::Internal::Type::request_parameters class SubscriptionListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor coupon_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -16,12 +18,14 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + coupon_id: String, ?cursor: String?, ?limit: Integer, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + coupon_id: String, cursor: String?, limit: Integer, request_options: Orb::RequestOptions diff --git a/sig/orb/models/credit_block_delete_params.rbs b/sig/orb/models/credit_block_delete_params.rbs index 9b60f1855..c7c7ba052 100644 --- a/sig/orb/models/credit_block_delete_params.rbs +++ b/sig/orb/models/credit_block_delete_params.rbs @@ -1,15 +1,20 @@ module Orb module Models type credit_block_delete_params = - { } & Orb::Internal::Type::request_parameters + { block_id: String } & Orb::Internal::Type::request_parameters class CreditBlockDeleteParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor block_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + block_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { block_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/credit_block_list_invoices_params.rbs b/sig/orb/models/credit_block_list_invoices_params.rbs index 87c3d9872..c0ea04380 100644 --- a/sig/orb/models/credit_block_list_invoices_params.rbs +++ b/sig/orb/models/credit_block_list_invoices_params.rbs @@ -1,15 +1,20 @@ module Orb module Models type credit_block_list_invoices_params = - { } & Orb::Internal::Type::request_parameters + { block_id: String } & Orb::Internal::Type::request_parameters class CreditBlockListInvoicesParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor block_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + block_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { block_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/credit_block_retrieve_params.rbs b/sig/orb/models/credit_block_retrieve_params.rbs index 165d62610..98142bcd6 100644 --- a/sig/orb/models/credit_block_retrieve_params.rbs +++ b/sig/orb/models/credit_block_retrieve_params.rbs @@ -1,15 +1,20 @@ module Orb module Models type credit_block_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { block_id: String } & Orb::Internal::Type::request_parameters class CreditBlockRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor block_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + block_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { block_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/credit_note_fetch_params.rbs b/sig/orb/models/credit_note_fetch_params.rbs index c09be7f4f..30e70a16f 100644 --- a/sig/orb/models/credit_note_fetch_params.rbs +++ b/sig/orb/models/credit_note_fetch_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type credit_note_fetch_params = - { } & Orb::Internal::Type::request_parameters + { credit_note_id: String } & Orb::Internal::Type::request_parameters class CreditNoteFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor credit_note_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + credit_note_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + credit_note_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer.rbs b/sig/orb/models/customer.rbs index 898d31327..6675e03dc 100644 --- a/sig/orb/models/customer.rbs +++ b/sig/orb/models/customer.rbs @@ -159,7 +159,12 @@ module Orb end type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + :quickbooks + | :"bill.com" + | :stripe_charge + | :stripe_invoice + | :netsuite + | :netsuite_ampersand module PaymentProvider extend Orb::Internal::Type::Enum @@ -169,6 +174,7 @@ module Orb STRIPE_CHARGE: :stripe_charge STRIPE_INVOICE: :stripe_invoice NETSUITE: :netsuite + NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::Customer::payment_provider] end @@ -215,13 +221,14 @@ module Orb provider_type: Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type } - type provider_type = :quickbooks | :netsuite + type provider_type = :quickbooks | :netsuite | :netsuite_ampersand 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 diff --git a/sig/orb/models/customer_create_params.rbs b/sig/orb/models/customer_create_params.rbs index 9128f84b5..2f9a78236 100644 --- a/sig/orb/models/customer_create_params.rbs +++ b/sig/orb/models/customer_create_params.rbs @@ -175,7 +175,12 @@ module Orb end type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + :quickbooks + | :"bill.com" + | :stripe_charge + | :stripe_invoice + | :netsuite + | :netsuite_ampersand module PaymentProvider extend Orb::Internal::Type::Enum @@ -185,6 +190,7 @@ module Orb STRIPE_CHARGE: :stripe_charge STRIPE_INVOICE: :stripe_invoice NETSUITE: :netsuite + NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::CustomerCreateParams::payment_provider] end diff --git a/sig/orb/models/customer_delete_params.rbs b/sig/orb/models/customer_delete_params.rbs index 3c69d63ef..39e9b3f1c 100644 --- a/sig/orb/models/customer_delete_params.rbs +++ b/sig/orb/models/customer_delete_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type customer_delete_params = { } & Orb::Internal::Type::request_parameters + type customer_delete_params = + { customer_id: String } & Orb::Internal::Type::request_parameters class CustomerDeleteParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor customer_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + customer_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + customer_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer_fetch_by_external_id_params.rbs b/sig/orb/models/customer_fetch_by_external_id_params.rbs index 205064879..fcacbf108 100644 --- a/sig/orb/models/customer_fetch_by_external_id_params.rbs +++ b/sig/orb/models/customer_fetch_by_external_id_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type customer_fetch_by_external_id_params = - { } & Orb::Internal::Type::request_parameters + { external_customer_id: String } & Orb::Internal::Type::request_parameters class CustomerFetchByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor external_customer_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + external_customer_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + external_customer_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer_fetch_params.rbs b/sig/orb/models/customer_fetch_params.rbs index 40ac900f0..61ed515ea 100644 --- a/sig/orb/models/customer_fetch_params.rbs +++ b/sig/orb/models/customer_fetch_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type customer_fetch_params = { } & Orb::Internal::Type::request_parameters + type customer_fetch_params = + { customer_id: String } & Orb::Internal::Type::request_parameters class CustomerFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor customer_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + customer_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + customer_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs b/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs index 62dcfdba9..64f5b15e9 100644 --- a/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +++ b/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type customer_sync_payment_methods_from_gateway_by_external_customer_id_params = - { } & Orb::Internal::Type::request_parameters + { external_customer_id: String } & Orb::Internal::Type::request_parameters class CustomerSyncPaymentMethodsFromGatewayByExternalCustomerIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor external_customer_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + external_customer_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + external_customer_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs b/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs index 0bbd17483..ed896812c 100644 --- a/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +++ b/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type customer_sync_payment_methods_from_gateway_params = - { } & Orb::Internal::Type::request_parameters + { customer_id: String } & Orb::Internal::Type::request_parameters class CustomerSyncPaymentMethodsFromGatewayParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor customer_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + customer_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + customer_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/customer_update_by_external_id_params.rbs b/sig/orb/models/customer_update_by_external_id_params.rbs index d2baf1e77..98f3471bd 100644 --- a/sig/orb/models/customer_update_by_external_id_params.rbs +++ b/sig/orb/models/customer_update_by_external_id_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type customer_update_by_external_id_params = { + id: String, accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, @@ -28,6 +29,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor id: String + attr_accessor accounting_sync_configuration: Orb::NewAccountingSyncConfiguration? attr_accessor additional_emails: ::Array[String]? @@ -67,6 +70,7 @@ module Orb attr_accessor tax_id: Orb::CustomerTaxID? def initialize: ( + id: String, ?accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, ?additional_emails: ::Array[String]?, ?auto_collection: bool?, @@ -90,6 +94,7 @@ module Orb ) -> void def to_hash: -> { + id: String, accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, @@ -170,7 +175,12 @@ module Orb end type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + :quickbooks + | :"bill.com" + | :stripe_charge + | :stripe_invoice + | :netsuite + | :netsuite_ampersand module PaymentProvider extend Orb::Internal::Type::Enum @@ -180,6 +190,7 @@ module Orb STRIPE_CHARGE: :stripe_charge STRIPE_INVOICE: :stripe_invoice NETSUITE: :netsuite + NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::CustomerUpdateByExternalIDParams::payment_provider] end diff --git a/sig/orb/models/customer_update_params.rbs b/sig/orb/models/customer_update_params.rbs index 9284dcd72..5a862494f 100644 --- a/sig/orb/models/customer_update_params.rbs +++ b/sig/orb/models/customer_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type customer_update_params = { + customer_id: String, accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, @@ -28,6 +29,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor accounting_sync_configuration: Orb::NewAccountingSyncConfiguration? attr_accessor additional_emails: ::Array[String]? @@ -67,6 +70,7 @@ module Orb attr_accessor tax_id: Orb::CustomerTaxID? def initialize: ( + customer_id: String, ?accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, ?additional_emails: ::Array[String]?, ?auto_collection: bool?, @@ -90,6 +94,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, accounting_sync_configuration: Orb::NewAccountingSyncConfiguration?, additional_emails: ::Array[String]?, auto_collection: bool?, @@ -170,7 +175,12 @@ module Orb end type payment_provider = - :quickbooks | :"bill.com" | :stripe_charge | :stripe_invoice | :netsuite + :quickbooks + | :"bill.com" + | :stripe_charge + | :stripe_invoice + | :netsuite + | :netsuite_ampersand module PaymentProvider extend Orb::Internal::Type::Enum @@ -180,6 +190,7 @@ module Orb STRIPE_CHARGE: :stripe_charge STRIPE_INVOICE: :stripe_invoice NETSUITE: :netsuite + NETSUITE_AMPERSAND: :netsuite_ampersand def self?.values: -> ::Array[Orb::Models::CustomerUpdateParams::payment_provider] end diff --git a/sig/orb/models/customers/balance_transaction_create_params.rbs b/sig/orb/models/customers/balance_transaction_create_params.rbs index 56f60712a..79a1918d9 100644 --- a/sig/orb/models/customers/balance_transaction_create_params.rbs +++ b/sig/orb/models/customers/balance_transaction_create_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type balance_transaction_create_params = { + customer_id: String, amount: String, type: Orb::Models::Customers::BalanceTransactionCreateParams::type_, description: String? @@ -13,6 +14,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor amount: String attr_accessor type: Orb::Models::Customers::BalanceTransactionCreateParams::type_ @@ -20,6 +23,7 @@ module Orb attr_accessor description: String? def initialize: ( + customer_id: String, amount: String, type: Orb::Models::Customers::BalanceTransactionCreateParams::type_, ?description: String?, @@ -27,6 +31,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, amount: String, type: Orb::Models::Customers::BalanceTransactionCreateParams::type_, description: String?, diff --git a/sig/orb/models/customers/balance_transaction_list_params.rbs b/sig/orb/models/customers/balance_transaction_list_params.rbs index 643df8d2c..52892f1ad 100644 --- a/sig/orb/models/customers/balance_transaction_list_params.rbs +++ b/sig/orb/models/customers/balance_transaction_list_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type balance_transaction_list_params = { + customer_id: String, cursor: String?, limit: Integer, operation_time_gt: Time?, @@ -16,6 +17,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -31,6 +34,7 @@ module Orb attr_accessor operation_time_lte: Time? def initialize: ( + customer_id: String, ?cursor: String?, ?limit: Integer, ?operation_time_gt: Time?, @@ -41,6 +45,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, cursor: String?, limit: Integer, operation_time_gt: Time?, diff --git a/sig/orb/models/customers/cost_list_by_external_id_params.rbs b/sig/orb/models/customers/cost_list_by_external_id_params.rbs index 70a1bde2b..1c87cd2c2 100644 --- a/sig/orb/models/customers/cost_list_by_external_id_params.rbs +++ b/sig/orb/models/customers/cost_list_by_external_id_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type cost_list_by_external_id_params = { + external_customer_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor currency: String? attr_accessor timeframe_end: Time? @@ -23,6 +26,7 @@ module Orb attr_accessor view_mode: Orb::Models::Customers::CostListByExternalIDParams::view_mode? def initialize: ( + external_customer_id: String, ?currency: String?, ?timeframe_end: Time?, ?timeframe_start: Time?, @@ -31,6 +35,7 @@ module Orb ) -> void def to_hash: -> { + external_customer_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, diff --git a/sig/orb/models/customers/cost_list_params.rbs b/sig/orb/models/customers/cost_list_params.rbs index a29913721..4a8ac7a28 100644 --- a/sig/orb/models/customers/cost_list_params.rbs +++ b/sig/orb/models/customers/cost_list_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type cost_list_params = { + customer_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor currency: String? attr_accessor timeframe_end: Time? @@ -23,6 +26,7 @@ module Orb attr_accessor view_mode: Orb::Models::Customers::CostListParams::view_mode? def initialize: ( + customer_id: String, ?currency: String?, ?timeframe_end: Time?, ?timeframe_start: Time?, @@ -31,6 +35,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, diff --git a/sig/orb/models/customers/credit_list_by_external_id_params.rbs b/sig/orb/models/customers/credit_list_by_external_id_params.rbs index 6b3d2414b..185be2023 100644 --- a/sig/orb/models/customers/credit_list_by_external_id_params.rbs +++ b/sig/orb/models/customers/credit_list_by_external_id_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type credit_list_by_external_id_params = { + external_customer_id: String, currency: String?, cursor: String?, effective_date_gt: Time?, @@ -18,6 +19,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor currency: String? attr_accessor cursor: String? @@ -39,6 +42,7 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + external_customer_id: String, ?currency: String?, ?cursor: String?, ?effective_date_gt: Time?, @@ -51,6 +55,7 @@ module Orb ) -> void def to_hash: -> { + external_customer_id: String, currency: String?, cursor: String?, effective_date_gt: Time?, diff --git a/sig/orb/models/customers/credit_list_params.rbs b/sig/orb/models/customers/credit_list_params.rbs index 422e1759b..fb305f947 100644 --- a/sig/orb/models/customers/credit_list_params.rbs +++ b/sig/orb/models/customers/credit_list_params.rbs @@ -3,6 +3,7 @@ module Orb module Customers type credit_list_params = { + customer_id: String, currency: String?, cursor: String?, effective_date_gt: Time?, @@ -18,6 +19,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor currency: String? attr_accessor cursor: String? @@ -39,6 +42,7 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + customer_id: String, ?currency: String?, ?cursor: String?, ?effective_date_gt: Time?, @@ -51,6 +55,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, currency: String?, cursor: String?, effective_date_gt: Time?, diff --git a/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs index 5916eb527..02ab868c9 100644 --- a/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs @@ -4,19 +4,8 @@ module Orb module Credits type ledger_create_entry_by_external_id_params = { - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type, - currency: String?, - description: String?, - effective_date: Time?, - expiry_date: Time?, - filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter]?, - invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?, - metadata: ::Hash[Symbol, String?]?, - per_unit_cost_basis: String?, - target_expiry_date: Date, - block_id: String, - void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason? + external_customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body } & Orb::Internal::Type::request_parameters @@ -24,204 +13,403 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - attr_accessor amount: Float + attr_accessor external_customer_id: String - attr_accessor entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type + attr_accessor body: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body - attr_accessor currency: String? + def initialize: ( + external_customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body, + ?request_options: Orb::request_opts + ) -> void - attr_accessor description: String? + def to_hash: -> { + external_customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body, + request_options: Orb::RequestOptions + } - attr_accessor effective_date: Time? + type body = + Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment + | Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement + | Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange + | Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void + | Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment + + module Body + extend Orb::Internal::Type::Union - attr_accessor expiry_date: Time? + type increment = + { + amount: Float, + entry_type: :increment, + currency: String?, + description: String?, + effective_date: Time?, + expiry_date: Time?, + filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter]?, + invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings?, + metadata: ::Hash[Symbol, String?]?, + per_unit_cost_basis: String? + } + + class Increment < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor entry_type: :increment + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor effective_date: Time? + + attr_accessor expiry_date: Time? + + attr_accessor filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter]? + + attr_accessor invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings? - attr_accessor filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter]? + attr_accessor metadata: ::Hash[Symbol, String?]? - attr_accessor invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings? + attr_accessor per_unit_cost_basis: String? - attr_accessor metadata: ::Hash[Symbol, String?]? + def initialize: ( + amount: Float, + ?currency: String?, + ?description: String?, + ?effective_date: Time?, + ?expiry_date: Time?, + ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter]?, + ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings?, + ?metadata: ::Hash[Symbol, String?]?, + ?per_unit_cost_basis: String?, + ?entry_type: :increment + ) -> void - attr_accessor per_unit_cost_basis: String? + def to_hash: -> { + amount: Float, + entry_type: :increment, + currency: String?, + description: String?, + effective_date: Time?, + expiry_date: Time?, + filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter]?, + invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings?, + metadata: ::Hash[Symbol, String?]?, + per_unit_cost_basis: String? + } + + type filter = + { + field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::operator, + values: ::Array[String] + } - attr_accessor target_expiry_date: Date + class Filter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::field - attr_accessor block_id: String + attr_accessor operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::operator - attr_accessor void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason? + attr_accessor values: ::Array[String] - def initialize: ( - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type, - target_expiry_date: Date, - block_id: String, - ?currency: String?, - ?description: String?, - ?effective_date: Time?, - ?expiry_date: Time?, - ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter]?, - ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?, - ?metadata: ::Hash[Symbol, String?]?, - ?per_unit_cost_basis: String?, - ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason?, - ?request_options: Orb::request_opts - ) -> void + def initialize: ( + field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::operator, + values: ::Array[String] + ) -> void - def to_hash: -> { - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type, - currency: String?, - description: String?, - effective_date: Time?, - expiry_date: Time?, - filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter]?, - invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?, - metadata: ::Hash[Symbol, String?]?, - per_unit_cost_basis: String?, - target_expiry_date: Date, - block_id: String, - void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason?, - request_options: Orb::RequestOptions - } + def to_hash: -> { + field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::operator, + values: ::Array[String] + } - type entry_type = :amendment + type field = :item_id - module EntryType - extend Orb::Internal::Type::Enum + module Field + extend Orb::Internal::Type::Enum - AMENDMENT: :amendment + ITEM_ID: :item_id - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type] - end + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::field] + end - type filter = - { - field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::operator, - values: ::Array[String] - } + type operator = :includes | :excludes - class Filter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::field + module Operator + extend Orb::Internal::Type::Enum - attr_accessor operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::operator + INCLUDES: :includes + EXCLUDES: :excludes - attr_accessor values: ::Array[String] + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::Filter::operator] + end + end - def initialize: ( - field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::operator, - values: ::Array[String] - ) -> void + type invoice_settings = + { + auto_collection: bool, + custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::custom_due_date?, + invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::invoice_date?, + item_id: String?, + mark_as_paid: bool, + memo: String?, + net_terms: Integer?, + require_successful_payment: bool + } - def to_hash: -> { - field: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::operator, - values: ::Array[String] - } + class InvoiceSettings < Orb::Internal::Type::BaseModel + attr_accessor auto_collection: bool - type field = :item_id + attr_accessor custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::custom_due_date? - module Field - extend Orb::Internal::Type::Enum + attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::invoice_date? - ITEM_ID: :item_id + attr_accessor item_id: String? - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::field] - end - - type operator = :includes | :excludes + attr_reader mark_as_paid: bool? + + def mark_as_paid=: (bool) -> bool + + attr_accessor memo: String? + + attr_accessor net_terms: Integer? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool - module Operator - extend Orb::Internal::Type::Enum + def initialize: ( + auto_collection: bool, + ?custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::custom_due_date?, + ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::invoice_date?, + ?item_id: String?, + ?mark_as_paid: bool, + ?memo: String?, + ?net_terms: Integer?, + ?require_successful_payment: bool + ) -> void - INCLUDES: :includes - EXCLUDES: :excludes + def to_hash: -> { + auto_collection: bool, + custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::custom_due_date?, + invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::invoice_date?, + item_id: String?, + mark_as_paid: bool, + memo: String?, + net_terms: Integer?, + require_successful_payment: bool + } - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter::operator] - end - end + type custom_due_date = Date | Time - type invoice_settings = - { - auto_collection: bool, - custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::custom_due_date?, - invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?, - item_id: String?, - mark_as_paid: bool, - memo: String?, - net_terms: Integer?, - require_successful_payment: bool - } + module CustomDueDate + extend Orb::Internal::Type::Union - class InvoiceSettings < Orb::Internal::Type::BaseModel - attr_accessor auto_collection: bool + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::custom_due_date] + end - attr_accessor custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::custom_due_date? + type invoice_date = Date | Time - attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date? + module InvoiceDate + extend Orb::Internal::Type::Union - attr_accessor item_id: String? + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment::InvoiceSettings::invoice_date] + end + end + end - attr_reader mark_as_paid: bool? + type decrement = + { + amount: Float, + entry_type: :decrement, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + + class Decrement < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor entry_type: :decrement + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + amount: Float, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :decrement + ) -> void + + def to_hash: -> { + amount: Float, + entry_type: :decrement, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + end - def mark_as_paid=: (bool) -> bool + type expiration_change = + { + entry_type: :expiration_change, + target_expiry_date: Date, + amount: Float?, + block_id: String?, + currency: String?, + description: String?, + expiry_date: Time?, + metadata: ::Hash[Symbol, String?]? + } + + class ExpirationChange < Orb::Internal::Type::BaseModel + attr_accessor entry_type: :expiration_change + + attr_accessor target_expiry_date: Date + + attr_accessor amount: Float? + + attr_accessor block_id: String? + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor expiry_date: Time? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + target_expiry_date: Date, + ?amount: Float?, + ?block_id: String?, + ?currency: String?, + ?description: String?, + ?expiry_date: Time?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :expiration_change + ) -> void + + def to_hash: -> { + entry_type: :expiration_change, + target_expiry_date: Date, + amount: Float?, + block_id: String?, + currency: String?, + description: String?, + expiry_date: Time?, + metadata: ::Hash[Symbol, String?]? + } + end - attr_accessor memo: String? + type void_ = + { + amount: Float, + block_id: String, + entry_type: :void, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]?, + void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason? + } - attr_accessor net_terms: Integer? + class Void < Orb::Internal::Type::BaseModel + attr_accessor amount: Float - attr_reader require_successful_payment: bool? + attr_accessor block_id: String - def require_successful_payment=: (bool) -> bool + attr_accessor entry_type: :void - def initialize: ( - auto_collection: bool, - ?custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::custom_due_date?, - ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?, - ?item_id: String?, - ?mark_as_paid: bool, - ?memo: String?, - ?net_terms: Integer?, - ?require_successful_payment: bool - ) -> void + attr_accessor currency: String? - def to_hash: -> { - auto_collection: bool, - custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::custom_due_date?, - invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?, - item_id: String?, - mark_as_paid: bool, - memo: String?, - net_terms: Integer?, - require_successful_payment: bool - } + attr_accessor description: String? - type custom_due_date = Date | Time + attr_accessor metadata: ::Hash[Symbol, String?]? - module CustomDueDate - extend Orb::Internal::Type::Union + attr_accessor void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason? - def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::custom_due_date] - end + def initialize: ( + amount: Float, + block_id: String, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason?, + ?entry_type: :void + ) -> void - type invoice_date = Date | Time + def to_hash: -> { + amount: Float, + block_id: String, + entry_type: :void, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]?, + void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason? + } - module InvoiceDate - extend Orb::Internal::Type::Union + type void_reason = :refund - def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date] - end - end + module VoidReason + extend Orb::Internal::Type::Enum - type void_reason = :refund + REFUND: :refund - module VoidReason - extend Orb::Internal::Type::Enum + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void::void_reason] + end + end - REFUND: :refund + type amendment = + { + amount: Float, + block_id: String, + entry_type: :amendment, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + + class Amendment < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor block_id: String + + attr_accessor entry_type: :amendment + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + amount: Float, + block_id: String, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :amendment + ) -> void + + def to_hash: -> { + amount: Float, + block_id: String, + entry_type: :amendment, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + end - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason] + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body] end end end diff --git a/sig/orb/models/customers/credits/ledger_create_entry_params.rbs b/sig/orb/models/customers/credits/ledger_create_entry_params.rbs index e203d537f..5dbe64777 100644 --- a/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +++ b/sig/orb/models/customers/credits/ledger_create_entry_params.rbs @@ -4,19 +4,8 @@ module Orb module Credits type ledger_create_entry_params = { - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type, - currency: String?, - description: String?, - effective_date: Time?, - expiry_date: Time?, - filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]?, - invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?, - metadata: ::Hash[Symbol, String?]?, - per_unit_cost_basis: String?, - target_expiry_date: Date, - block_id: String, - void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason? + customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryParams::body } & Orb::Internal::Type::request_parameters @@ -24,204 +13,403 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - attr_accessor amount: Float + attr_accessor customer_id: String - attr_accessor entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type + attr_accessor body: Orb::Models::Customers::Credits::LedgerCreateEntryParams::body - attr_accessor currency: String? + def initialize: ( + customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryParams::body, + ?request_options: Orb::request_opts + ) -> void - attr_accessor description: String? + def to_hash: -> { + customer_id: String, + body: Orb::Models::Customers::Credits::LedgerCreateEntryParams::body, + request_options: Orb::RequestOptions + } - attr_accessor effective_date: Time? + type body = + Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment + | Orb::Customers::Credits::LedgerCreateEntryParams::Body::Decrement + | Orb::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange + | Orb::Customers::Credits::LedgerCreateEntryParams::Body::Void + | Orb::Customers::Credits::LedgerCreateEntryParams::Body::Amendment + + module Body + extend Orb::Internal::Type::Union - attr_accessor expiry_date: Time? + type increment = + { + amount: Float, + entry_type: :increment, + currency: String?, + description: String?, + effective_date: Time?, + expiry_date: Time?, + filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter]?, + invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings?, + metadata: ::Hash[Symbol, String?]?, + per_unit_cost_basis: String? + } + + class Increment < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor entry_type: :increment + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor effective_date: Time? + + attr_accessor expiry_date: Time? + + attr_accessor filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter]? + + attr_accessor invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings? - attr_accessor filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]? + attr_accessor metadata: ::Hash[Symbol, String?]? - attr_accessor invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings? + attr_accessor per_unit_cost_basis: String? - attr_accessor metadata: ::Hash[Symbol, String?]? + def initialize: ( + amount: Float, + ?currency: String?, + ?description: String?, + ?effective_date: Time?, + ?expiry_date: Time?, + ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter]?, + ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings?, + ?metadata: ::Hash[Symbol, String?]?, + ?per_unit_cost_basis: String?, + ?entry_type: :increment + ) -> void - attr_accessor per_unit_cost_basis: String? + def to_hash: -> { + amount: Float, + entry_type: :increment, + currency: String?, + description: String?, + effective_date: Time?, + expiry_date: Time?, + filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter]?, + invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings?, + metadata: ::Hash[Symbol, String?]?, + per_unit_cost_basis: String? + } + + type filter = + { + field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::operator, + values: ::Array[String] + } - attr_accessor target_expiry_date: Date + class Filter < Orb::Internal::Type::BaseModel + attr_accessor field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::field - attr_accessor block_id: String + attr_accessor operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::operator - attr_accessor void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason? + attr_accessor values: ::Array[String] - def initialize: ( - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type, - target_expiry_date: Date, - block_id: String, - ?currency: String?, - ?description: String?, - ?effective_date: Time?, - ?expiry_date: Time?, - ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]?, - ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?, - ?metadata: ::Hash[Symbol, String?]?, - ?per_unit_cost_basis: String?, - ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason?, - ?request_options: Orb::request_opts - ) -> void + def initialize: ( + field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::operator, + values: ::Array[String] + ) -> void - def to_hash: -> { - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type, - currency: String?, - description: String?, - effective_date: Time?, - expiry_date: Time?, - filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]?, - invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?, - metadata: ::Hash[Symbol, String?]?, - per_unit_cost_basis: String?, - target_expiry_date: Date, - block_id: String, - void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason?, - request_options: Orb::RequestOptions - } + def to_hash: -> { + field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::field, + operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::operator, + values: ::Array[String] + } - type entry_type = :amendment + type field = :item_id - module EntryType - extend Orb::Internal::Type::Enum + module Field + extend Orb::Internal::Type::Enum - AMENDMENT: :amendment + ITEM_ID: :item_id - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type] - end + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::field] + end - type filter = - { - field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::operator, - values: ::Array[String] - } + type operator = :includes | :excludes - class Filter < Orb::Internal::Type::BaseModel - attr_accessor field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::field + module Operator + extend Orb::Internal::Type::Enum - attr_accessor operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::operator + INCLUDES: :includes + EXCLUDES: :excludes - attr_accessor values: ::Array[String] + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::Filter::operator] + end + end - def initialize: ( - field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::operator, - values: ::Array[String] - ) -> void + type invoice_settings = + { + auto_collection: bool, + custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date?, + invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date?, + item_id: String?, + mark_as_paid: bool, + memo: String?, + net_terms: Integer?, + require_successful_payment: bool + } - def to_hash: -> { - field: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::field, - operator: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::operator, - values: ::Array[String] - } + class InvoiceSettings < Orb::Internal::Type::BaseModel + attr_accessor auto_collection: bool - type field = :item_id + attr_accessor custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date? - module Field - extend Orb::Internal::Type::Enum + attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date? - ITEM_ID: :item_id + attr_accessor item_id: String? - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::field] - end - - type operator = :includes | :excludes + attr_reader mark_as_paid: bool? + + def mark_as_paid=: (bool) -> bool + + attr_accessor memo: String? + + attr_accessor net_terms: Integer? + + attr_reader require_successful_payment: bool? + + def require_successful_payment=: (bool) -> bool - module Operator - extend Orb::Internal::Type::Enum + def initialize: ( + auto_collection: bool, + ?custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date?, + ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date?, + ?item_id: String?, + ?mark_as_paid: bool, + ?memo: String?, + ?net_terms: Integer?, + ?require_successful_payment: bool + ) -> void - INCLUDES: :includes - EXCLUDES: :excludes + def to_hash: -> { + auto_collection: bool, + custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date?, + invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date?, + item_id: String?, + mark_as_paid: bool, + memo: String?, + net_terms: Integer?, + require_successful_payment: bool + } - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter::operator] - end - end + type custom_due_date = Date | Time - type invoice_settings = - { - auto_collection: bool, - custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::custom_due_date?, - invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?, - item_id: String?, - mark_as_paid: bool, - memo: String?, - net_terms: Integer?, - require_successful_payment: bool - } + module CustomDueDate + extend Orb::Internal::Type::Union - class InvoiceSettings < Orb::Internal::Type::BaseModel - attr_accessor auto_collection: bool + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::custom_due_date] + end - attr_accessor custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::custom_due_date? + type invoice_date = Date | Time - attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date? + module InvoiceDate + extend Orb::Internal::Type::Union - attr_accessor item_id: String? + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment::InvoiceSettings::invoice_date] + end + end + end - attr_reader mark_as_paid: bool? + type decrement = + { + amount: Float, + entry_type: :decrement, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + + class Decrement < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor entry_type: :decrement + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + amount: Float, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :decrement + ) -> void + + def to_hash: -> { + amount: Float, + entry_type: :decrement, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + end - def mark_as_paid=: (bool) -> bool + type expiration_change = + { + entry_type: :expiration_change, + target_expiry_date: Date, + amount: Float?, + block_id: String?, + currency: String?, + description: String?, + expiry_date: Time?, + metadata: ::Hash[Symbol, String?]? + } + + class ExpirationChange < Orb::Internal::Type::BaseModel + attr_accessor entry_type: :expiration_change + + attr_accessor target_expiry_date: Date + + attr_accessor amount: Float? + + attr_accessor block_id: String? + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor expiry_date: Time? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + target_expiry_date: Date, + ?amount: Float?, + ?block_id: String?, + ?currency: String?, + ?description: String?, + ?expiry_date: Time?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :expiration_change + ) -> void + + def to_hash: -> { + entry_type: :expiration_change, + target_expiry_date: Date, + amount: Float?, + block_id: String?, + currency: String?, + description: String?, + expiry_date: Time?, + metadata: ::Hash[Symbol, String?]? + } + end - attr_accessor memo: String? + type void_ = + { + amount: Float, + block_id: String, + entry_type: :void, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]?, + void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::void_reason? + } - attr_accessor net_terms: Integer? + class Void < Orb::Internal::Type::BaseModel + attr_accessor amount: Float - attr_reader require_successful_payment: bool? + attr_accessor block_id: String - def require_successful_payment=: (bool) -> bool + attr_accessor entry_type: :void - def initialize: ( - auto_collection: bool, - ?custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::custom_due_date?, - ?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?, - ?item_id: String?, - ?mark_as_paid: bool, - ?memo: String?, - ?net_terms: Integer?, - ?require_successful_payment: bool - ) -> void + attr_accessor currency: String? - def to_hash: -> { - auto_collection: bool, - custom_due_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::custom_due_date?, - invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?, - item_id: String?, - mark_as_paid: bool, - memo: String?, - net_terms: Integer?, - require_successful_payment: bool - } + attr_accessor description: String? - type custom_due_date = Date | Time + attr_accessor metadata: ::Hash[Symbol, String?]? - module CustomDueDate - extend Orb::Internal::Type::Union + attr_accessor void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::void_reason? - def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::custom_due_date] - end + def initialize: ( + amount: Float, + block_id: String, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::void_reason?, + ?entry_type: :void + ) -> void - type invoice_date = Date | Time + def to_hash: -> { + amount: Float, + block_id: String, + entry_type: :void, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]?, + void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::void_reason? + } - module InvoiceDate - extend Orb::Internal::Type::Union + type void_reason = :refund - def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date] - end - end + module VoidReason + extend Orb::Internal::Type::Enum - type void_reason = :refund + REFUND: :refund - module VoidReason - extend Orb::Internal::Type::Enum + def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void::void_reason] + end + end - REFUND: :refund + type amendment = + { + amount: Float, + block_id: String, + entry_type: :amendment, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + + class Amendment < Orb::Internal::Type::BaseModel + attr_accessor amount: Float + + attr_accessor block_id: String + + attr_accessor entry_type: :amendment + + attr_accessor currency: String? + + attr_accessor description: String? + + attr_accessor metadata: ::Hash[Symbol, String?]? + + def initialize: ( + amount: Float, + block_id: String, + ?currency: String?, + ?description: String?, + ?metadata: ::Hash[Symbol, String?]?, + ?entry_type: :amendment + ) -> void + + def to_hash: -> { + amount: Float, + block_id: String, + entry_type: :amendment, + currency: String?, + description: String?, + metadata: ::Hash[Symbol, String?]? + } + end - def self?.values: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason] + def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::body] end end end diff --git a/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs b/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs index 2dd22599c..e5c8e6cbf 100644 --- a/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs @@ -4,6 +4,7 @@ module Orb module Credits type ledger_list_by_external_id_params = { + external_customer_id: String, created_at_gt: Time?, created_at_gte: Time?, created_at_lt: Time?, @@ -21,6 +22,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor created_at_gt: Time? attr_accessor created_at_gte: Time? @@ -44,6 +47,7 @@ module Orb attr_accessor minimum_amount: String? def initialize: ( + external_customer_id: String, ?created_at_gt: Time?, ?created_at_gte: Time?, ?created_at_lt: Time?, @@ -58,6 +62,7 @@ module Orb ) -> void def to_hash: -> { + external_customer_id: String, created_at_gt: Time?, created_at_gte: Time?, created_at_lt: Time?, diff --git a/sig/orb/models/customers/credits/ledger_list_params.rbs b/sig/orb/models/customers/credits/ledger_list_params.rbs index 5eda42ab9..5fad779b9 100644 --- a/sig/orb/models/customers/credits/ledger_list_params.rbs +++ b/sig/orb/models/customers/credits/ledger_list_params.rbs @@ -4,6 +4,7 @@ module Orb module Credits type ledger_list_params = { + customer_id: String, created_at_gt: Time?, created_at_gte: Time?, created_at_lt: Time?, @@ -21,6 +22,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor created_at_gt: Time? attr_accessor created_at_gte: Time? @@ -44,6 +47,7 @@ module Orb attr_accessor minimum_amount: String? def initialize: ( + customer_id: String, ?created_at_gt: Time?, ?created_at_gte: Time?, ?created_at_lt: Time?, @@ -58,6 +62,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, created_at_gt: Time?, created_at_gte: Time?, created_at_lt: Time?, diff --git a/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs b/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs index 1477ee4ad..b9863b7de 100644 --- a/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs @@ -4,6 +4,7 @@ module Orb module Credits type top_up_create_by_external_id_params = { + external_customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, @@ -19,6 +20,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor amount: String attr_accessor currency: String @@ -36,6 +39,7 @@ module Orb attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::expires_after_unit? def initialize: ( + external_customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, @@ -48,6 +52,7 @@ module Orb ) -> void def to_hash: -> { + external_customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings, diff --git a/sig/orb/models/customers/credits/top_up_create_params.rbs b/sig/orb/models/customers/credits/top_up_create_params.rbs index a91dd9674..a27c46cf4 100644 --- a/sig/orb/models/customers/credits/top_up_create_params.rbs +++ b/sig/orb/models/customers/credits/top_up_create_params.rbs @@ -4,6 +4,7 @@ module Orb module Credits type top_up_create_params = { + customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateParams::InvoiceSettings, @@ -19,6 +20,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor amount: String attr_accessor currency: String @@ -36,6 +39,7 @@ module Orb attr_accessor expires_after_unit: Orb::Models::Customers::Credits::TopUpCreateParams::expires_after_unit? def initialize: ( + customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateParams::InvoiceSettings, @@ -48,6 +52,7 @@ module Orb ) -> void def to_hash: -> { + customer_id: String, amount: String, currency: String, invoice_settings: Orb::Customers::Credits::TopUpCreateParams::InvoiceSettings, diff --git a/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs b/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs index eefcd1d36..3be8c3968 100644 --- a/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs @@ -3,7 +3,7 @@ module Orb module Customers module Credits type top_up_delete_by_external_id_params = - { external_customer_id: String } + { external_customer_id: String, top_up_id: String } & Orb::Internal::Type::request_parameters class TopUpDeleteByExternalIDParams < Orb::Internal::Type::BaseModel @@ -12,13 +12,17 @@ module Orb attr_accessor external_customer_id: String + attr_accessor top_up_id: String + def initialize: ( external_customer_id: String, + top_up_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { external_customer_id: String, + top_up_id: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/customers/credits/top_up_delete_params.rbs b/sig/orb/models/customers/credits/top_up_delete_params.rbs index 6a63ff2bd..843a4f3d9 100644 --- a/sig/orb/models/customers/credits/top_up_delete_params.rbs +++ b/sig/orb/models/customers/credits/top_up_delete_params.rbs @@ -3,7 +3,8 @@ module Orb module Customers module Credits type top_up_delete_params = - { customer_id: String } & Orb::Internal::Type::request_parameters + { customer_id: String, top_up_id: String } + & Orb::Internal::Type::request_parameters class TopUpDeleteParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -11,13 +12,17 @@ module Orb attr_accessor customer_id: String + attr_accessor top_up_id: String + def initialize: ( customer_id: String, + top_up_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { customer_id: String, + top_up_id: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs b/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs index 804f4030e..07d6528b9 100644 --- a/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +++ b/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs @@ -3,13 +3,15 @@ module Orb module Customers module Credits type top_up_list_by_external_id_params = - { cursor: String?, limit: Integer } + { external_customer_id: String, cursor: String?, limit: Integer } & Orb::Internal::Type::request_parameters class TopUpListByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_customer_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -17,12 +19,14 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + external_customer_id: String, ?cursor: String?, ?limit: Integer, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + external_customer_id: String, cursor: String?, limit: Integer, request_options: Orb::RequestOptions diff --git a/sig/orb/models/customers/credits/top_up_list_params.rbs b/sig/orb/models/customers/credits/top_up_list_params.rbs index edbbb4e1b..a1d1ef2b6 100644 --- a/sig/orb/models/customers/credits/top_up_list_params.rbs +++ b/sig/orb/models/customers/credits/top_up_list_params.rbs @@ -3,13 +3,15 @@ module Orb module Customers module Credits type top_up_list_params = - { cursor: String?, limit: Integer } + { customer_id: String, cursor: String?, limit: Integer } & Orb::Internal::Type::request_parameters class TopUpListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor customer_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -17,12 +19,14 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + customer_id: String, ?cursor: String?, ?limit: Integer, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + customer_id: String, cursor: String?, limit: Integer, request_options: Orb::RequestOptions diff --git a/sig/orb/models/dimensional_price_group_retrieve_params.rbs b/sig/orb/models/dimensional_price_group_retrieve_params.rbs index 243605e48..76af740ca 100644 --- a/sig/orb/models/dimensional_price_group_retrieve_params.rbs +++ b/sig/orb/models/dimensional_price_group_retrieve_params.rbs @@ -1,15 +1,24 @@ module Orb module Models type dimensional_price_group_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { dimensional_price_group_id: String } + & Orb::Internal::Type::request_parameters class DimensionalPriceGroupRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor dimensional_price_group_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + dimensional_price_group_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + dimensional_price_group_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/dimensional_price_group_update_params.rbs b/sig/orb/models/dimensional_price_group_update_params.rbs index 5b92f9530..e6f405340 100644 --- a/sig/orb/models/dimensional_price_group_update_params.rbs +++ b/sig/orb/models/dimensional_price_group_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type dimensional_price_group_update_params = { + dimensional_price_group_id: String, external_dimensional_price_group_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -11,17 +12,21 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor dimensional_price_group_id: String + attr_accessor external_dimensional_price_group_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + dimensional_price_group_id: String, ?external_dimensional_price_group_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + dimensional_price_group_id: String, external_dimensional_price_group_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs b/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs index 77b458076..0772b714d 100644 --- a/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +++ b/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs @@ -2,15 +2,24 @@ module Orb module Models module DimensionalPriceGroups type external_dimensional_price_group_id_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { external_dimensional_price_group_id: String } + & Orb::Internal::Type::request_parameters class ExternalDimensionalPriceGroupIDRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor external_dimensional_price_group_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + external_dimensional_price_group_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + external_dimensional_price_group_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs b/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs index 28fa81585..d274d99f2 100644 --- a/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +++ b/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs @@ -3,6 +3,7 @@ module Orb module DimensionalPriceGroups type external_dimensional_price_group_id_update_params = { + path_external_dimensional_price_group_id: String, body_external_dimensional_price_group_id: String?, metadata: ::Hash[Symbol, String?]? } @@ -12,17 +13,21 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor path_external_dimensional_price_group_id: String + attr_accessor body_external_dimensional_price_group_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + path_external_dimensional_price_group_id: String, ?body_external_dimensional_price_group_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + path_external_dimensional_price_group_id: String, body_external_dimensional_price_group_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/event_deprecate_params.rbs b/sig/orb/models/event_deprecate_params.rbs index 7f735fa73..f7f03be5d 100644 --- a/sig/orb/models/event_deprecate_params.rbs +++ b/sig/orb/models/event_deprecate_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type event_deprecate_params = { } & Orb::Internal::Type::request_parameters + type event_deprecate_params = + { event_id: String } & Orb::Internal::Type::request_parameters class EventDeprecateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor event_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + event_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { event_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/event_update_params.rbs b/sig/orb/models/event_update_params.rbs index 0a310156e..ebe0cc4b1 100644 --- a/sig/orb/models/event_update_params.rbs +++ b/sig/orb/models/event_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type event_update_params = { + event_id: String, event_name: String, properties: ::Hash[Symbol, top], timestamp: Time, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor event_id: String + attr_accessor event_name: String attr_accessor properties: ::Hash[Symbol, top] @@ -25,6 +28,7 @@ module Orb attr_accessor external_customer_id: String? def initialize: ( + event_id: String, event_name: String, properties: ::Hash[Symbol, top], timestamp: Time, @@ -34,6 +38,7 @@ module Orb ) -> void def to_hash: -> { + event_id: String, event_name: String, properties: ::Hash[Symbol, top], timestamp: Time, diff --git a/sig/orb/models/events/backfill_close_params.rbs b/sig/orb/models/events/backfill_close_params.rbs index 2417f3398..bc24ee129 100644 --- a/sig/orb/models/events/backfill_close_params.rbs +++ b/sig/orb/models/events/backfill_close_params.rbs @@ -2,15 +2,23 @@ module Orb module Models module Events type backfill_close_params = - { } & Orb::Internal::Type::request_parameters + { backfill_id: String } & Orb::Internal::Type::request_parameters class BackfillCloseParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor backfill_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + backfill_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + backfill_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/events/backfill_fetch_params.rbs b/sig/orb/models/events/backfill_fetch_params.rbs index 255364b7e..efc9a076b 100644 --- a/sig/orb/models/events/backfill_fetch_params.rbs +++ b/sig/orb/models/events/backfill_fetch_params.rbs @@ -2,15 +2,23 @@ module Orb module Models module Events type backfill_fetch_params = - { } & Orb::Internal::Type::request_parameters + { backfill_id: String } & Orb::Internal::Type::request_parameters class BackfillFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor backfill_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + backfill_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + backfill_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/events/backfill_revert_params.rbs b/sig/orb/models/events/backfill_revert_params.rbs index 302a66157..3cfa7d3f8 100644 --- a/sig/orb/models/events/backfill_revert_params.rbs +++ b/sig/orb/models/events/backfill_revert_params.rbs @@ -2,15 +2,23 @@ module Orb module Models module Events type backfill_revert_params = - { } & Orb::Internal::Type::request_parameters + { backfill_id: String } & Orb::Internal::Type::request_parameters class BackfillRevertParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor backfill_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + backfill_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + backfill_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/invoice_delete_line_item_params.rbs b/sig/orb/models/invoice_delete_line_item_params.rbs index 7f30d301e..aed5db5b7 100644 --- a/sig/orb/models/invoice_delete_line_item_params.rbs +++ b/sig/orb/models/invoice_delete_line_item_params.rbs @@ -1,7 +1,8 @@ module Orb module Models type invoice_delete_line_item_params = - { invoice_id: String } & Orb::Internal::Type::request_parameters + { invoice_id: String, line_item_id: String } + & Orb::Internal::Type::request_parameters class InvoiceDeleteLineItemParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -9,13 +10,17 @@ module Orb attr_accessor invoice_id: String + attr_accessor line_item_id: String + def initialize: ( invoice_id: String, + line_item_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { invoice_id: String, + line_item_id: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/invoice_fetch_params.rbs b/sig/orb/models/invoice_fetch_params.rbs index e74e547b5..9ffec42c6 100644 --- a/sig/orb/models/invoice_fetch_params.rbs +++ b/sig/orb/models/invoice_fetch_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type invoice_fetch_params = { } & Orb::Internal::Type::request_parameters + type invoice_fetch_params = + { invoice_id: String } & Orb::Internal::Type::request_parameters class InvoiceFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor invoice_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + invoice_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + invoice_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/invoice_issue_params.rbs b/sig/orb/models/invoice_issue_params.rbs index 369291ba8..120044b38 100644 --- a/sig/orb/models/invoice_issue_params.rbs +++ b/sig/orb/models/invoice_issue_params.rbs @@ -1,22 +1,27 @@ module Orb module Models type invoice_issue_params = - { synchronous: bool } & Orb::Internal::Type::request_parameters + { invoice_id: String, synchronous: bool } + & Orb::Internal::Type::request_parameters class InvoiceIssueParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor invoice_id: String + attr_reader synchronous: bool? def synchronous=: (bool) -> bool def initialize: ( + invoice_id: String, ?synchronous: bool, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + invoice_id: String, synchronous: bool, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/invoice_issue_summary_params.rbs b/sig/orb/models/invoice_issue_summary_params.rbs index 993fb315c..795ac1ab2 100644 --- a/sig/orb/models/invoice_issue_summary_params.rbs +++ b/sig/orb/models/invoice_issue_summary_params.rbs @@ -1,22 +1,27 @@ module Orb module Models type invoice_issue_summary_params = - { synchronous: bool } & Orb::Internal::Type::request_parameters + { invoice_id: String, synchronous: bool } + & Orb::Internal::Type::request_parameters class InvoiceIssueSummaryParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor invoice_id: String + attr_reader synchronous: bool? def synchronous=: (bool) -> bool def initialize: ( + invoice_id: String, ?synchronous: bool, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + invoice_id: String, synchronous: bool, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/invoice_mark_paid_params.rbs b/sig/orb/models/invoice_mark_paid_params.rbs index b3979aedc..508608672 100644 --- a/sig/orb/models/invoice_mark_paid_params.rbs +++ b/sig/orb/models/invoice_mark_paid_params.rbs @@ -1,13 +1,20 @@ module Orb module Models type invoice_mark_paid_params = - { payment_received_date: Date, external_id: String?, notes: String? } + { + invoice_id: String, + payment_received_date: Date, + external_id: String?, + notes: String? + } & Orb::Internal::Type::request_parameters class InvoiceMarkPaidParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor invoice_id: String + attr_accessor payment_received_date: Date attr_accessor external_id: String? @@ -15,6 +22,7 @@ module Orb attr_accessor notes: String? def initialize: ( + invoice_id: String, payment_received_date: Date, ?external_id: String?, ?notes: String?, @@ -22,6 +30,7 @@ module Orb ) -> void def to_hash: -> { + invoice_id: String, payment_received_date: Date, external_id: String?, notes: String?, diff --git a/sig/orb/models/invoice_pay_params.rbs b/sig/orb/models/invoice_pay_params.rbs index a5cfc6356..a872989a7 100644 --- a/sig/orb/models/invoice_pay_params.rbs +++ b/sig/orb/models/invoice_pay_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type invoice_pay_params = { } & Orb::Internal::Type::request_parameters + type invoice_pay_params = + { invoice_id: String } & Orb::Internal::Type::request_parameters class InvoicePayParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor invoice_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + invoice_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + invoice_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/invoice_update_params.rbs b/sig/orb/models/invoice_update_params.rbs index 1297a408a..3b5c4394d 100644 --- a/sig/orb/models/invoice_update_params.rbs +++ b/sig/orb/models/invoice_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type invoice_update_params = { + invoice_id: String, auto_collection: bool?, due_date: Orb::Models::InvoiceUpdateParams::due_date?, invoice_date: Orb::Models::InvoiceUpdateParams::invoice_date?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor invoice_id: String + attr_accessor auto_collection: bool? attr_accessor due_date: Orb::Models::InvoiceUpdateParams::due_date? @@ -25,6 +28,7 @@ module Orb attr_accessor net_terms: Integer? def initialize: ( + invoice_id: String, ?auto_collection: bool?, ?due_date: Orb::Models::InvoiceUpdateParams::due_date?, ?invoice_date: Orb::Models::InvoiceUpdateParams::invoice_date?, @@ -34,6 +38,7 @@ module Orb ) -> void def to_hash: -> { + invoice_id: String, auto_collection: bool?, due_date: Orb::Models::InvoiceUpdateParams::due_date?, invoice_date: Orb::Models::InvoiceUpdateParams::invoice_date?, diff --git a/sig/orb/models/invoice_void_params.rbs b/sig/orb/models/invoice_void_params.rbs index 3a5257cd9..5883f1903 100644 --- a/sig/orb/models/invoice_void_params.rbs +++ b/sig/orb/models/invoice_void_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type invoice_void_params = { } & Orb::Internal::Type::request_parameters + type invoice_void_params = + { invoice_id: String } & Orb::Internal::Type::request_parameters class InvoiceVoidParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor invoice_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + invoice_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + invoice_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/item_archive_params.rbs b/sig/orb/models/item_archive_params.rbs index dcd3284b6..d07ef281a 100644 --- a/sig/orb/models/item_archive_params.rbs +++ b/sig/orb/models/item_archive_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type item_archive_params = { } & Orb::Internal::Type::request_parameters + type item_archive_params = + { item_id: String } & Orb::Internal::Type::request_parameters class ItemArchiveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor item_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + item_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { item_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/item_fetch_params.rbs b/sig/orb/models/item_fetch_params.rbs index aefa29ff1..964ab658b 100644 --- a/sig/orb/models/item_fetch_params.rbs +++ b/sig/orb/models/item_fetch_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type item_fetch_params = { } & Orb::Internal::Type::request_parameters + type item_fetch_params = + { item_id: String } & Orb::Internal::Type::request_parameters class ItemFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor item_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + item_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { item_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/item_update_params.rbs b/sig/orb/models/item_update_params.rbs index 34d01cbfa..9c18da6e7 100644 --- a/sig/orb/models/item_update_params.rbs +++ b/sig/orb/models/item_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type item_update_params = { + item_id: String, external_connections: ::Array[Orb::ItemUpdateParams::ExternalConnection]?, metadata: ::Hash[Symbol, String?]?, name: String? @@ -12,6 +13,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor item_id: String + attr_accessor external_connections: ::Array[Orb::ItemUpdateParams::ExternalConnection]? attr_accessor metadata: ::Hash[Symbol, String?]? @@ -19,6 +22,7 @@ module Orb attr_accessor name: String? def initialize: ( + item_id: String, ?external_connections: ::Array[Orb::ItemUpdateParams::ExternalConnection]?, ?metadata: ::Hash[Symbol, String?]?, ?name: String?, @@ -26,6 +30,7 @@ module Orb ) -> void def to_hash: -> { + item_id: String, external_connections: ::Array[Orb::ItemUpdateParams::ExternalConnection]?, metadata: ::Hash[Symbol, String?]?, name: String?, diff --git a/sig/orb/models/license_deactivate_params.rbs b/sig/orb/models/license_deactivate_params.rbs index c1678feb0..35fd854bc 100644 --- a/sig/orb/models/license_deactivate_params.rbs +++ b/sig/orb/models/license_deactivate_params.rbs @@ -1,20 +1,28 @@ module Orb module Models type license_deactivate_params = - { end_date: Date? } & Orb::Internal::Type::request_parameters + { license_id: String, end_date: Date? } + & Orb::Internal::Type::request_parameters class LicenseDeactivateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor license_id: String + attr_accessor end_date: Date? def initialize: ( + license_id: String, ?end_date: Date?, ?request_options: Orb::request_opts ) -> void - def to_hash: -> { end_date: Date?, request_options: Orb::RequestOptions } + def to_hash: -> { + license_id: String, + end_date: Date?, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/license_retrieve_by_external_id_params.rbs b/sig/orb/models/license_retrieve_by_external_id_params.rbs index f11aac550..8232e038f 100644 --- a/sig/orb/models/license_retrieve_by_external_id_params.rbs +++ b/sig/orb/models/license_retrieve_by_external_id_params.rbs @@ -1,24 +1,32 @@ module Orb module Models type license_retrieve_by_external_id_params = - { license_type_id: String, subscription_id: String } + { + external_license_id: String, + license_type_id: String, + subscription_id: String + } & Orb::Internal::Type::request_parameters class LicenseRetrieveByExternalIDParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_license_id: String + attr_accessor license_type_id: String attr_accessor subscription_id: String def initialize: ( + external_license_id: String, license_type_id: String, subscription_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + external_license_id: String, license_type_id: String, subscription_id: String, request_options: Orb::RequestOptions diff --git a/sig/orb/models/license_retrieve_params.rbs b/sig/orb/models/license_retrieve_params.rbs index 4dcce92f4..6936ea69e 100644 --- a/sig/orb/models/license_retrieve_params.rbs +++ b/sig/orb/models/license_retrieve_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type license_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { license_id: String } & Orb::Internal::Type::request_parameters class LicenseRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor license_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + license_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + license_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/license_type_retrieve_params.rbs b/sig/orb/models/license_type_retrieve_params.rbs index 4eed92707..77a6556c1 100644 --- a/sig/orb/models/license_type_retrieve_params.rbs +++ b/sig/orb/models/license_type_retrieve_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type license_type_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { license_type_id: String } & Orb::Internal::Type::request_parameters class LicenseTypeRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor license_type_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + license_type_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + license_type_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/licenses/external_license_get_usage_params.rbs b/sig/orb/models/licenses/external_license_get_usage_params.rbs index 82a08a435..63991a109 100644 --- a/sig/orb/models/licenses/external_license_get_usage_params.rbs +++ b/sig/orb/models/licenses/external_license_get_usage_params.rbs @@ -3,6 +3,7 @@ module Orb module Licenses type external_license_get_usage_params = { + external_license_id: String, license_type_id: String, subscription_id: String, cursor: String?, @@ -17,6 +18,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_license_id: String + attr_accessor license_type_id: String attr_accessor subscription_id: String @@ -34,6 +37,7 @@ module Orb attr_accessor start_date: Date? def initialize: ( + external_license_id: String, license_type_id: String, subscription_id: String, ?cursor: String?, @@ -45,6 +49,7 @@ module Orb ) -> void def to_hash: -> { + external_license_id: String, license_type_id: String, subscription_id: String, cursor: String?, diff --git a/sig/orb/models/licenses/usage_get_usage_params.rbs b/sig/orb/models/licenses/usage_get_usage_params.rbs index c91d264ea..c3b157061 100644 --- a/sig/orb/models/licenses/usage_get_usage_params.rbs +++ b/sig/orb/models/licenses/usage_get_usage_params.rbs @@ -3,6 +3,7 @@ module Orb module Licenses type usage_get_usage_params = { + license_id: String, cursor: String?, end_date: Date?, group_by: ::Array[String]?, @@ -15,6 +16,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor license_id: String + attr_accessor cursor: String? attr_accessor end_date: Date? @@ -28,6 +31,7 @@ module Orb attr_accessor start_date: Date? def initialize: ( + license_id: String, ?cursor: String?, ?end_date: Date?, ?group_by: ::Array[String]?, @@ -37,6 +41,7 @@ module Orb ) -> void def to_hash: -> { + license_id: String, cursor: String?, end_date: Date?, group_by: ::Array[String]?, diff --git a/sig/orb/models/metric_fetch_params.rbs b/sig/orb/models/metric_fetch_params.rbs index 6b29738ba..f51deb302 100644 --- a/sig/orb/models/metric_fetch_params.rbs +++ b/sig/orb/models/metric_fetch_params.rbs @@ -1,14 +1,23 @@ module Orb module Models - type metric_fetch_params = { } & Orb::Internal::Type::request_parameters + type metric_fetch_params = + { metric_id: String } & Orb::Internal::Type::request_parameters class MetricFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor metric_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + metric_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + metric_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/metric_update_params.rbs b/sig/orb/models/metric_update_params.rbs index 64b2e2fe9..3c5004bf5 100644 --- a/sig/orb/models/metric_update_params.rbs +++ b/sig/orb/models/metric_update_params.rbs @@ -1,21 +1,25 @@ module Orb module Models type metric_update_params = - { metadata: ::Hash[Symbol, String?]? } + { metric_id: String, metadata: ::Hash[Symbol, String?]? } & Orb::Internal::Type::request_parameters class MetricUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor metric_id: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + metric_id: String, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + metric_id: String, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index b582eec5f..c39d1f83a 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -74,6 +74,7 @@ module Orb type price = { allocation_price: Orb::NewAllocationPrice?, + license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, plan_phase_order: Integer?, price: Orb::Models::PlanCreateParams::Price::price? } @@ -81,22 +82,5871 @@ 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 plan_phase_order: Integer? attr_accessor price: Orb::Models::PlanCreateParams::Price::price? def initialize: ( ?allocation_price: Orb::NewAllocationPrice?, + ?license_allocation_price: Orb::Models::PlanCreateParams::Price::license_allocation_price?, ?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?, 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? + } + + 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 + 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? + + 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::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 + ) -> 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? + } + + 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 + + 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::PlanCreateParams::Price::license_allocation_price] + end + type price = Orb::NewPlanUnitPrice | Orb::NewPlanTieredPrice diff --git a/sig/orb/models/plan_fetch_params.rbs b/sig/orb/models/plan_fetch_params.rbs index 410e73f20..15b672787 100644 --- a/sig/orb/models/plan_fetch_params.rbs +++ b/sig/orb/models/plan_fetch_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type plan_fetch_params = { } & Orb::Internal::Type::request_parameters + type plan_fetch_params = + { plan_id: String } & Orb::Internal::Type::request_parameters class PlanFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor plan_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + plan_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { plan_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/plan_update_params.rbs b/sig/orb/models/plan_update_params.rbs index c8ee6832c..317305a91 100644 --- a/sig/orb/models/plan_update_params.rbs +++ b/sig/orb/models/plan_update_params.rbs @@ -1,24 +1,32 @@ module Orb module Models type plan_update_params = - { external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } + { + plan_id: String, + external_plan_id: String?, + metadata: ::Hash[Symbol, String?]? + } & Orb::Internal::Type::request_parameters class PlanUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor plan_id: String + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + plan_id: String, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + plan_id: String, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/plans/external_plan_id_fetch_params.rbs b/sig/orb/models/plans/external_plan_id_fetch_params.rbs index e8d85a11a..e5a12f937 100644 --- a/sig/orb/models/plans/external_plan_id_fetch_params.rbs +++ b/sig/orb/models/plans/external_plan_id_fetch_params.rbs @@ -2,15 +2,23 @@ module Orb module Models module Plans type external_plan_id_fetch_params = - { } & Orb::Internal::Type::request_parameters + { external_plan_id: String } & Orb::Internal::Type::request_parameters class ExternalPlanIDFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor external_plan_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + external_plan_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + external_plan_id: String, + request_options: Orb::RequestOptions + } end end end 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 e7fdff15f..dda4557a2 100644 --- a/sig/orb/models/plans/external_plan_id_update_params.rbs +++ b/sig/orb/models/plans/external_plan_id_update_params.rbs @@ -2,24 +2,32 @@ module Orb module Models module Plans type external_plan_id_update_params = - { external_plan_id: String?, metadata: ::Hash[Symbol, String?]? } + { + other_external_plan_id: String, + external_plan_id: String?, + metadata: ::Hash[Symbol, String?]? + } & Orb::Internal::Type::request_parameters class ExternalPlanIDUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor other_external_plan_id: String + attr_accessor external_plan_id: String? attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + other_external_plan_id: String, ?external_plan_id: String?, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + other_external_plan_id: String, external_plan_id: String?, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/plans/migration_cancel_params.rbs b/sig/orb/models/plans/migration_cancel_params.rbs index f5f049581..a74c94ba4 100644 --- a/sig/orb/models/plans/migration_cancel_params.rbs +++ b/sig/orb/models/plans/migration_cancel_params.rbs @@ -2,7 +2,8 @@ module Orb module Models module Plans type migration_cancel_params = - { plan_id: String } & Orb::Internal::Type::request_parameters + { plan_id: String, migration_id: String } + & Orb::Internal::Type::request_parameters class MigrationCancelParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -10,13 +11,17 @@ module Orb attr_accessor plan_id: String + attr_accessor migration_id: String + def initialize: ( plan_id: String, + migration_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { plan_id: String, + migration_id: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/plans/migration_list_params.rbs b/sig/orb/models/plans/migration_list_params.rbs index 4f49ac379..6444b548b 100644 --- a/sig/orb/models/plans/migration_list_params.rbs +++ b/sig/orb/models/plans/migration_list_params.rbs @@ -2,13 +2,15 @@ module Orb module Models module Plans type migration_list_params = - { cursor: String?, limit: Integer } + { plan_id: String, cursor: String?, limit: Integer } & Orb::Internal::Type::request_parameters class MigrationListParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor plan_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -16,12 +18,14 @@ module Orb def limit=: (Integer) -> Integer def initialize: ( + plan_id: String, ?cursor: String?, ?limit: Integer, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + plan_id: String, cursor: String?, limit: Integer, request_options: Orb::RequestOptions diff --git a/sig/orb/models/plans/migration_retrieve_params.rbs b/sig/orb/models/plans/migration_retrieve_params.rbs index ebb0ee414..b2c4cc58c 100644 --- a/sig/orb/models/plans/migration_retrieve_params.rbs +++ b/sig/orb/models/plans/migration_retrieve_params.rbs @@ -2,7 +2,8 @@ module Orb module Models module Plans type migration_retrieve_params = - { plan_id: String } & Orb::Internal::Type::request_parameters + { plan_id: String, migration_id: String } + & Orb::Internal::Type::request_parameters class MigrationRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter @@ -10,13 +11,17 @@ module Orb attr_accessor plan_id: String + attr_accessor migration_id: String + def initialize: ( plan_id: String, + migration_id: String, ?request_options: Orb::request_opts ) -> void def to_hash: -> { plan_id: String, + migration_id: String, request_options: Orb::RequestOptions } end diff --git a/sig/orb/models/price_create_params.rbs b/sig/orb/models/price_create_params.rbs index 91b594a56..a3562fbc5 100644 --- a/sig/orb/models/price_create_params.rbs +++ b/sig/orb/models/price_create_params.rbs @@ -1,1200 +1,805 @@ module Orb module Models type price_create_params = - { - cadence: Orb::Models::PriceCreateParams::cadence, - currency: String, - item_id: String, - model_type: Orb::Models::PriceCreateParams::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::PriceCreateParams::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?]?, - tiered_config: Orb::TieredConfig, - bulk_config: Orb::BulkConfig, - bulk_with_filters_config: Orb::PriceCreateParams::BulkWithFiltersConfig, - package_config: Orb::PackageConfig, - matrix_config: Orb::MatrixConfig, - threshold_total_amount_config: Orb::PriceCreateParams::ThresholdTotalAmountConfig, - tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig, - tiered_with_minimum_config: Orb::PriceCreateParams::TieredWithMinimumConfig, - grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig, - tiered_package_with_minimum_config: Orb::PriceCreateParams::TieredPackageWithMinimumConfig, - package_with_allocation_config: Orb::PriceCreateParams::PackageWithAllocationConfig, - unit_with_percent_config: Orb::PriceCreateParams::UnitWithPercentConfig, - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - tiered_with_proration_config: Orb::PriceCreateParams::TieredWithProrationConfig, - unit_with_proration_config: Orb::PriceCreateParams::UnitWithProrationConfig, - grouped_allocation_config: Orb::PriceCreateParams::GroupedAllocationConfig, - bulk_with_proration_config: Orb::PriceCreateParams::BulkWithProrationConfig, - grouped_with_prorated_minimum_config: Orb::PriceCreateParams::GroupedWithProratedMinimumConfig, - grouped_with_metered_minimum_config: Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig, - grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - matrix_with_display_name_config: Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - grouped_tiered_package_config: Orb::PriceCreateParams::GroupedTieredPackageConfig, - max_group_tiered_package_config: Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - scalable_matrix_with_unit_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - scalable_matrix_with_tiered_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - cumulative_grouped_bulk_config: Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - cumulative_grouped_allocation_config: Orb::PriceCreateParams::CumulativeGroupedAllocationConfig, - minimum_composite_config: Orb::PriceCreateParams::MinimumCompositeConfig, - percent_config: Orb::PriceCreateParams::PercentConfig, - event_output_config: Orb::PriceCreateParams::EventOutputConfig - } + { body: Orb::Models::PriceCreateParams::body } & Orb::Internal::Type::request_parameters class PriceCreateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - attr_accessor cadence: Orb::Models::PriceCreateParams::cadence - - attr_accessor currency: String - - attr_accessor item_id: String - - attr_accessor model_type: Orb::Models::PriceCreateParams::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::PriceCreateParams::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?]? - - attr_accessor tiered_config: Orb::TieredConfig - - attr_accessor bulk_config: Orb::BulkConfig - - attr_accessor bulk_with_filters_config: Orb::PriceCreateParams::BulkWithFiltersConfig - - attr_accessor package_config: Orb::PackageConfig - - attr_accessor matrix_config: Orb::MatrixConfig - - attr_accessor threshold_total_amount_config: Orb::PriceCreateParams::ThresholdTotalAmountConfig - - attr_accessor tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig - - attr_accessor tiered_with_minimum_config: Orb::PriceCreateParams::TieredWithMinimumConfig - - attr_accessor grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig - - attr_accessor tiered_package_with_minimum_config: Orb::PriceCreateParams::TieredPackageWithMinimumConfig - - attr_accessor package_with_allocation_config: Orb::PriceCreateParams::PackageWithAllocationConfig - - attr_accessor unit_with_percent_config: Orb::PriceCreateParams::UnitWithPercentConfig - - attr_accessor matrix_with_allocation_config: Orb::MatrixWithAllocationConfig - - attr_accessor tiered_with_proration_config: Orb::PriceCreateParams::TieredWithProrationConfig - - attr_accessor unit_with_proration_config: Orb::PriceCreateParams::UnitWithProrationConfig - - attr_accessor grouped_allocation_config: Orb::PriceCreateParams::GroupedAllocationConfig - - attr_accessor bulk_with_proration_config: Orb::PriceCreateParams::BulkWithProrationConfig - - attr_accessor grouped_with_prorated_minimum_config: Orb::PriceCreateParams::GroupedWithProratedMinimumConfig - - attr_accessor grouped_with_metered_minimum_config: Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig - - attr_accessor grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig - - attr_accessor matrix_with_display_name_config: Orb::PriceCreateParams::MatrixWithDisplayNameConfig - - attr_accessor grouped_tiered_package_config: Orb::PriceCreateParams::GroupedTieredPackageConfig - - attr_accessor max_group_tiered_package_config: Orb::PriceCreateParams::MaxGroupTieredPackageConfig - - attr_accessor scalable_matrix_with_unit_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig - - attr_accessor scalable_matrix_with_tiered_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig - - attr_accessor cumulative_grouped_bulk_config: Orb::PriceCreateParams::CumulativeGroupedBulkConfig - - attr_accessor cumulative_grouped_allocation_config: Orb::PriceCreateParams::CumulativeGroupedAllocationConfig - - attr_accessor minimum_composite_config: Orb::PriceCreateParams::MinimumCompositeConfig - - attr_accessor percent_config: Orb::PriceCreateParams::PercentConfig - - attr_accessor event_output_config: Orb::PriceCreateParams::EventOutputConfig + attr_accessor body: Orb::Models::PriceCreateParams::body def initialize: ( - cadence: Orb::Models::PriceCreateParams::cadence, - currency: String, - item_id: String, - model_type: Orb::Models::PriceCreateParams::model_type, - name: String, - unit_config: Orb::UnitConfig, - tiered_config: Orb::TieredConfig, - bulk_config: Orb::BulkConfig, - bulk_with_filters_config: Orb::PriceCreateParams::BulkWithFiltersConfig, - package_config: Orb::PackageConfig, - matrix_config: Orb::MatrixConfig, - threshold_total_amount_config: Orb::PriceCreateParams::ThresholdTotalAmountConfig, - tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig, - tiered_with_minimum_config: Orb::PriceCreateParams::TieredWithMinimumConfig, - grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig, - tiered_package_with_minimum_config: Orb::PriceCreateParams::TieredPackageWithMinimumConfig, - package_with_allocation_config: Orb::PriceCreateParams::PackageWithAllocationConfig, - unit_with_percent_config: Orb::PriceCreateParams::UnitWithPercentConfig, - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - tiered_with_proration_config: Orb::PriceCreateParams::TieredWithProrationConfig, - unit_with_proration_config: Orb::PriceCreateParams::UnitWithProrationConfig, - grouped_allocation_config: Orb::PriceCreateParams::GroupedAllocationConfig, - bulk_with_proration_config: Orb::PriceCreateParams::BulkWithProrationConfig, - grouped_with_prorated_minimum_config: Orb::PriceCreateParams::GroupedWithProratedMinimumConfig, - grouped_with_metered_minimum_config: Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig, - grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - matrix_with_display_name_config: Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - grouped_tiered_package_config: Orb::PriceCreateParams::GroupedTieredPackageConfig, - max_group_tiered_package_config: Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - scalable_matrix_with_unit_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - scalable_matrix_with_tiered_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - cumulative_grouped_bulk_config: Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - cumulative_grouped_allocation_config: Orb::PriceCreateParams::CumulativeGroupedAllocationConfig, - minimum_composite_config: Orb::PriceCreateParams::MinimumCompositeConfig, - percent_config: Orb::PriceCreateParams::PercentConfig, - event_output_config: Orb::PriceCreateParams::EventOutputConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PriceCreateParams::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?]?, + body: Orb::Models::PriceCreateParams::body, ?request_options: Orb::request_opts ) -> void def to_hash: -> { - cadence: Orb::Models::PriceCreateParams::cadence, - currency: String, - item_id: String, - model_type: Orb::Models::PriceCreateParams::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::PriceCreateParams::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?]?, - tiered_config: Orb::TieredConfig, - bulk_config: Orb::BulkConfig, - bulk_with_filters_config: Orb::PriceCreateParams::BulkWithFiltersConfig, - package_config: Orb::PackageConfig, - matrix_config: Orb::MatrixConfig, - threshold_total_amount_config: Orb::PriceCreateParams::ThresholdTotalAmountConfig, - tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig, - tiered_with_minimum_config: Orb::PriceCreateParams::TieredWithMinimumConfig, - grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig, - tiered_package_with_minimum_config: Orb::PriceCreateParams::TieredPackageWithMinimumConfig, - package_with_allocation_config: Orb::PriceCreateParams::PackageWithAllocationConfig, - unit_with_percent_config: Orb::PriceCreateParams::UnitWithPercentConfig, - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - tiered_with_proration_config: Orb::PriceCreateParams::TieredWithProrationConfig, - unit_with_proration_config: Orb::PriceCreateParams::UnitWithProrationConfig, - grouped_allocation_config: Orb::PriceCreateParams::GroupedAllocationConfig, - bulk_with_proration_config: Orb::PriceCreateParams::BulkWithProrationConfig, - grouped_with_prorated_minimum_config: Orb::PriceCreateParams::GroupedWithProratedMinimumConfig, - grouped_with_metered_minimum_config: Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig, - grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - matrix_with_display_name_config: Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - grouped_tiered_package_config: Orb::PriceCreateParams::GroupedTieredPackageConfig, - max_group_tiered_package_config: Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - scalable_matrix_with_unit_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - scalable_matrix_with_tiered_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - cumulative_grouped_bulk_config: Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - cumulative_grouped_allocation_config: Orb::PriceCreateParams::CumulativeGroupedAllocationConfig, - minimum_composite_config: Orb::PriceCreateParams::MinimumCompositeConfig, - percent_config: Orb::PriceCreateParams::PercentConfig, - event_output_config: Orb::PriceCreateParams::EventOutputConfig, + body: Orb::Models::PriceCreateParams::body, request_options: Orb::RequestOptions } - 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 + type body = + Orb::NewFloatingUnitPrice + | Orb::NewFloatingTieredPrice + | Orb::NewFloatingBulkPrice + | Orb::PriceCreateParams::Body::BulkWithFilters + | Orb::NewFloatingPackagePrice + | Orb::NewFloatingMatrixPrice + | Orb::NewFloatingThresholdTotalAmountPrice + | Orb::NewFloatingTieredPackagePrice + | Orb::NewFloatingTieredWithMinimumPrice + | Orb::NewFloatingGroupedTieredPrice + | Orb::NewFloatingTieredPackageWithMinimumPrice + | Orb::NewFloatingPackageWithAllocationPrice + | Orb::NewFloatingUnitWithPercentPrice + | Orb::NewFloatingMatrixWithAllocationPrice + | Orb::NewFloatingTieredWithProrationPrice + | Orb::NewFloatingUnitWithProrationPrice + | Orb::NewFloatingGroupedAllocationPrice + | Orb::NewFloatingBulkWithProrationPrice + | Orb::NewFloatingGroupedWithProratedMinimumPrice + | Orb::NewFloatingGroupedWithMeteredMinimumPrice + | Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds + | Orb::NewFloatingMatrixWithDisplayNamePrice + | Orb::NewFloatingGroupedTieredPackagePrice + | Orb::NewFloatingMaxGroupTieredPackagePrice + | Orb::NewFloatingScalableMatrixWithUnitPricingPrice + | Orb::NewFloatingScalableMatrixWithTieredPricingPrice + | Orb::NewFloatingCumulativeGroupedBulkPrice + | Orb::PriceCreateParams::Body::CumulativeGroupedAllocation + | Orb::NewFloatingMinimumCompositePrice + | Orb::PriceCreateParams::Body::Percent + | Orb::PriceCreateParams::Body::EventOutput + + module Body + extend Orb::Internal::Type::Union + + type bulk_with_filters = + { + bulk_with_filters_config: Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PriceCreateParams::Body::BulkWithFilters::cadence, + currency: String, + 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::PriceCreateParams::Body::BulkWithFilters::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?]? + } - def self?.values: -> ::Array[Orb::Models::PriceCreateParams::cadence] - end + class BulkWithFilters < Orb::Internal::Type::BaseModel + attr_accessor bulk_with_filters_config: Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig - type model_type = :event_output + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::BulkWithFilters::cadence - module ModelType - extend Orb::Internal::Type::Enum + attr_accessor currency: String - EVENT_OUTPUT: :event_output + attr_accessor item_id: String - def self?.values: -> ::Array[Orb::Models::PriceCreateParams::model_type] - end + attr_accessor model_type: :bulk_with_filters - type bulk_with_filters_config = - { - filters: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] - } + attr_accessor name: String - class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel - attr_accessor filters: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter] + attr_accessor billable_metric_id: String? - attr_accessor tiers: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] + attr_accessor billed_in_advance: bool? - def initialize: ( - filters: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] - ) -> void + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - def to_hash: -> { - filters: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Filter], - tiers: ::Array[Orb::PriceCreateParams::BulkWithFiltersConfig::Tier] - } + attr_accessor conversion_rate: Float? - type filter = { property_key: String, property_value: String } + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::BulkWithFilters::conversion_rate_config? - class Filter < Orb::Internal::Type::BaseModel - attr_accessor property_key: String + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - attr_accessor property_value: String + attr_accessor external_price_id: String? - def initialize: (property_key: String, property_value: String) -> void + attr_accessor fixed_price_quantity: Float? - def to_hash: -> { property_key: String, property_value: String } - end + attr_accessor invoice_grouping_key: String? - type tier = { unit_amount: String, tier_lower_bound: String? } + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - class Tier < Orb::Internal::Type::BaseModel - attr_accessor unit_amount: String + attr_accessor license_type_id: String? - attr_accessor tier_lower_bound: String? + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - unit_amount: String, - ?tier_lower_bound: String? + bulk_with_filters_config: Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PriceCreateParams::Body::BulkWithFilters::cadence, + currency: String, + 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::BulkWithFilters::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: :bulk_with_filters ) -> void - def to_hash: -> { unit_amount: String, tier_lower_bound: String? } - end - end - - type threshold_total_amount_config = - { - consumption_table: ::Array[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } + def to_hash: -> { + bulk_with_filters_config: Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig, + cadence: Orb::Models::PriceCreateParams::Body::BulkWithFilters::cadence, + currency: String, + 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::PriceCreateParams::Body::BulkWithFilters::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 ThresholdTotalAmountConfig < Orb::Internal::Type::BaseModel - attr_accessor consumption_table: ::Array[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable] + type bulk_with_filters_config = + { + filters: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - attr_accessor prorate: bool? + class BulkWithFiltersConfig < Orb::Internal::Type::BaseModel + attr_accessor filters: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter] - def initialize: ( - consumption_table: ::Array[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable], - ?prorate: bool? - ) -> void + attr_accessor tiers: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] - def to_hash: -> { - consumption_table: ::Array[Orb::PriceCreateParams::ThresholdTotalAmountConfig::ConsumptionTable], - prorate: bool? - } + def initialize: ( + filters: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] + ) -> void - type consumption_table = { threshold: String, total_amount: String } + def to_hash: -> { + filters: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Filter], + tiers: ::Array[Orb::PriceCreateParams::Body::BulkWithFilters::BulkWithFiltersConfig::Tier] + } - class ConsumptionTable < Orb::Internal::Type::BaseModel - attr_accessor threshold: String + type filter = { property_key: String, property_value: String } - attr_accessor total_amount: String + class Filter < Orb::Internal::Type::BaseModel + attr_accessor property_key: String - def initialize: (threshold: String, total_amount: String) -> void + attr_accessor property_value: String - def to_hash: -> { threshold: String, total_amount: String } - end - end + def initialize: ( + property_key: String, + property_value: String + ) -> void - type tiered_package_config = - { - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier] - } + def to_hash: -> { property_key: String, property_value: String } + end - class TieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: String + type tier = { unit_amount: String, tier_lower_bound: String? } - attr_accessor tiers: ::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier] + class Tier < Orb::Internal::Type::BaseModel + attr_accessor unit_amount: String - def initialize: ( - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier] - ) -> void + attr_accessor tier_lower_bound: String? - def to_hash: -> { - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageConfig::Tier] - } + def initialize: ( + unit_amount: String, + ?tier_lower_bound: String? + ) -> void - type tier = { per_unit: String, tier_lower_bound: String } + def to_hash: -> { unit_amount: String, tier_lower_bound: String? } + end + end - class Tier < Orb::Internal::Type::BaseModel - attr_accessor per_unit: String + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - attr_accessor tier_lower_bound: String + module Cadence + extend Orb::Internal::Type::Enum - def initialize: (per_unit: String, tier_lower_bound: String) -> void + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def to_hash: -> { per_unit: String, tier_lower_bound: String } + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::BulkWithFilters::cadence] + end end - end - - type tiered_with_minimum_config = - { - tiers: ::Array[Orb::PriceCreateParams::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - class TieredWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PriceCreateParams::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::PriceCreateParams::TieredWithMinimumConfig::Tier], - ?hide_zero_amount_tiers: bool, - ?prorate: bool - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PriceCreateParams::TieredWithMinimumConfig::Tier], - hide_zero_amount_tiers: bool, - prorate: bool - } - - type tier = + type grouped_with_min_max_thresholds = { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String + cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence, + currency: String, + grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::GroupedWithMinMaxThresholds::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 Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + class GroupedWithMinMaxThresholds < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence - attr_accessor tier_lower_bound: String + attr_accessor currency: String - attr_accessor unit_amount: String + attr_accessor grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::Body::GroupedWithMinMaxThresholds::GroupedWithMinMaxThresholdsConfig - def initialize: ( - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - ) -> void + attr_accessor item_id: String - def to_hash: -> { - minimum_amount: String, - tier_lower_bound: String, - unit_amount: String - } - end - end - - type grouped_tiered_config = - { - grouping_key: String, - tiers: ::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier] - } - - class GroupedTieredConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor tiers: ::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier] + attr_accessor model_type: :grouped_with_min_max_thresholds - def initialize: ( - grouping_key: String, - tiers: ::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier] - ) -> void + attr_accessor name: String - def to_hash: -> { - grouping_key: String, - tiers: ::Array[Orb::PriceCreateParams::GroupedTieredConfig::Tier] - } + attr_accessor billable_metric_id: String? - type tier = { tier_lower_bound: String, unit_amount: String } + attr_accessor billed_in_advance: bool? - 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 + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - type tiered_package_with_minimum_config = - { - package_size: Float, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] - } + attr_accessor conversion_rate: Float? - class TieredPackageWithMinimumConfig < Orb::Internal::Type::BaseModel - attr_accessor package_size: Float + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::conversion_rate_config? - attr_accessor tiers: ::Array[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - def initialize: ( - package_size: Float, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] - ) -> void + attr_accessor external_price_id: String? - def to_hash: -> { - package_size: Float, - tiers: ::Array[Orb::PriceCreateParams::TieredPackageWithMinimumConfig::Tier] - } + attr_accessor fixed_price_quantity: Float? - type tier = - { minimum_amount: String, per_unit: String, tier_lower_bound: String } + attr_accessor invoice_grouping_key: String? - class Tier < Orb::Internal::Type::BaseModel - attr_accessor minimum_amount: String + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor per_unit: String + attr_accessor license_type_id: String? - attr_accessor tier_lower_bound: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence, + currency: String, + grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::GroupedWithMinMaxThresholds::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: :grouped_with_min_max_thresholds ) -> void def to_hash: -> { - minimum_amount: String, - per_unit: String, - tier_lower_bound: String + cadence: Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds::cadence, + currency: String, + grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::GroupedWithMinMaxThresholds::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?]? } - end - 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 - - 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 - - type tiered_with_proration_config = - { - tiers: ::Array[Orb::PriceCreateParams::TieredWithProrationConfig::Tier] - } - - class TieredWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PriceCreateParams::TieredWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PriceCreateParams::TieredWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PriceCreateParams::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 } + 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::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 - 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 - - 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 bulk_with_proration_config = - { - tiers: ::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] - } - - class BulkWithProrationConfig < Orb::Internal::Type::BaseModel - attr_accessor tiers: ::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] - - def initialize: ( - tiers: ::Array[Orb::PriceCreateParams::BulkWithProrationConfig::Tier] - ) -> void - - def to_hash: -> { - tiers: ::Array[Orb::PriceCreateParams::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 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 grouped_with_metered_minimum_config = - { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PriceCreateParams::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::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor] - - attr_accessor scaling_key: String - - attr_accessor unit_amounts: ::Array[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount] - - def initialize: ( - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::UnitAmount] - ) -> void - - def to_hash: -> { - grouping_key: String, - minimum_unit_amount: String, - pricing_key: String, - scaling_factors: ::Array[Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig::ScalingFactor], - scaling_key: String, - unit_amounts: ::Array[Orb::PriceCreateParams::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 + type cumulative_grouped_allocation = + { + cadence: Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + currency: String, + 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::PriceCreateParams::Body::CumulativeGroupedAllocation::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?]? + } - def initialize: (pricing_value: String, unit_amount: String) -> void + class CumulativeGroupedAllocation < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::cadence - def to_hash: -> { pricing_value: String, unit_amount: String } - end - end + attr_accessor cumulative_grouped_allocation_config: Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig - type grouped_with_min_max_thresholds_config = - { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } + attr_accessor currency: String - class GroupedWithMinMaxThresholdsConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + attr_accessor item_id: String - attr_accessor maximum_charge: String + attr_accessor model_type: :cumulative_grouped_allocation - attr_accessor minimum_charge: String + attr_accessor name: String - attr_accessor per_unit_rate: String + attr_accessor billable_metric_id: String? - def initialize: ( - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - ) -> void + attr_accessor billed_in_advance: bool? - def to_hash: -> { - grouping_key: String, - maximum_charge: String, - minimum_charge: String, - per_unit_rate: String - } - end + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - type matrix_with_display_name_config = - { - dimension: String, - unit_amounts: ::Array[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] - } + attr_accessor conversion_rate: Float? - class MatrixWithDisplayNameConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension: String + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::conversion_rate_config? - attr_accessor unit_amounts: ::Array[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - def initialize: ( - dimension: String, - unit_amounts: ::Array[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] - ) -> void + attr_accessor external_price_id: String? - def to_hash: -> { - dimension: String, - unit_amounts: ::Array[Orb::PriceCreateParams::MatrixWithDisplayNameConfig::UnitAmount] - } + attr_accessor fixed_price_quantity: Float? - type unit_amount = - { dimension_value: String, display_name: String, unit_amount: String } + attr_accessor invoice_grouping_key: String? - class UnitAmount < Orb::Internal::Type::BaseModel - attr_accessor dimension_value: String + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor display_name: String + attr_accessor license_type_id: String? - attr_accessor unit_amount: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - dimension_value: String, - display_name: String, - unit_amount: String + cadence: Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + currency: String, + 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::CumulativeGroupedAllocation::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: :cumulative_grouped_allocation ) -> void def to_hash: -> { - dimension_value: String, - display_name: String, - unit_amount: String + cadence: Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation::cadence, + cumulative_grouped_allocation_config: Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::CumulativeGroupedAllocationConfig, + currency: String, + 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::PriceCreateParams::Body::CumulativeGroupedAllocation::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?]? } - end - end - - type grouped_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier] - } - class GroupedTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::GroupedTieredPackageConfig::Tier] - ) -> void - - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::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 } + 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::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 - end - - type max_group_tiered_package_config = - { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] - } - - class MaxGroupTieredPackageConfig < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String - - attr_accessor package_size: String - - attr_accessor tiers: ::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] - - def initialize: ( - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] - ) -> void - def to_hash: -> { - grouping_key: String, - package_size: String, - tiers: ::Array[Orb::PriceCreateParams::MaxGroupTieredPackageConfig::Tier] - } + type percent = + { + cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, + currency: String, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::PriceCreateParams::Body::Percent::PercentConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::Percent::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 tier = { tier_lower_bound: String, unit_amount: String } + class Percent < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + attr_accessor currency: String - attr_accessor unit_amount: String + attr_accessor item_id: String - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void + attr_accessor model_type: :percent - def to_hash: -> { tier_lower_bound: String, unit_amount: String } - end - end + attr_accessor name: String - type scalable_matrix_with_unit_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } + attr_accessor percent_config: Orb::PriceCreateParams::Body::Percent::PercentConfig - class ScalableMatrixWithUnitPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String + attr_accessor billable_metric_id: String? - attr_accessor matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor] + attr_accessor billed_in_advance: bool? - attr_accessor unit_price: String + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor grouping_key: String? + attr_accessor conversion_rate: Float? - attr_accessor prorate: bool? + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::Percent::conversion_rate_config? - attr_accessor second_dimension: String? + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - ?grouping_key: String?, - ?prorate: bool?, - ?second_dimension: String? - ) -> void + attr_accessor external_price_id: String? - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig::MatrixScalingFactor], - unit_price: String, - grouping_key: String?, - prorate: bool?, - second_dimension: String? - } + attr_accessor fixed_price_quantity: Float? - type matrix_scaling_factor = - { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } + attr_accessor invoice_grouping_key: String? - class MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor scaling_factor: String + attr_accessor license_type_id: String? - attr_accessor second_dimension_value: String? + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? + cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, + currency: String, + item_id: String, + name: String, + percent_config: Orb::PriceCreateParams::Body::Percent::PercentConfig, + ?billable_metric_id: String?, + ?billed_in_advance: bool?, + ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + ?conversion_rate: Float?, + ?conversion_rate_config: Orb::Models::PriceCreateParams::Body::Percent::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: :percent ) -> void def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? + cadence: Orb::Models::PriceCreateParams::Body::Percent::cadence, + currency: String, + item_id: String, + model_type: :percent, + name: String, + percent_config: Orb::PriceCreateParams::Body::Percent::PercentConfig, + billable_metric_id: String?, + billed_in_advance: bool?, + billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, + conversion_rate: Float?, + conversion_rate_config: Orb::Models::PriceCreateParams::Body::Percent::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?]? } - end - end - type scalable_matrix_with_tiered_pricing_config = - { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - class ScalableMatrixWithTieredPricingConfig < Orb::Internal::Type::BaseModel - attr_accessor first_dimension: String + module Cadence + extend Orb::Internal::Type::Enum - attr_accessor matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor] + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - attr_accessor tiers: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier] + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::Percent::cadence] + end - attr_accessor second_dimension: String? + type percent_config = { percent: Float } - def initialize: ( - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier], - ?second_dimension: String? - ) -> void + class PercentConfig < Orb::Internal::Type::BaseModel + attr_accessor percent: Float - def to_hash: -> { - first_dimension: String, - matrix_scaling_factors: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::MatrixScalingFactor], - tiers: ::Array[Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig::Tier], - second_dimension: String? - } + def initialize: (percent: Float) -> void - type matrix_scaling_factor = + def to_hash: -> { percent: Float } + end + end + + type event_output = { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? + cadence: Orb::Models::PriceCreateParams::Body::EventOutput::cadence, + currency: String, + event_output_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::EventOutput::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 MatrixScalingFactor < Orb::Internal::Type::BaseModel - attr_accessor first_dimension_value: String + class EventOutput < Orb::Internal::Type::BaseModel + attr_accessor cadence: Orb::Models::PriceCreateParams::Body::EventOutput::cadence - attr_accessor scaling_factor: String + attr_accessor currency: String - attr_accessor second_dimension_value: String? + attr_accessor event_output_config: Orb::PriceCreateParams::Body::EventOutput::EventOutputConfig - def initialize: ( - first_dimension_value: String, - scaling_factor: String, - ?second_dimension_value: String? - ) -> void + attr_accessor item_id: String - def to_hash: -> { - first_dimension_value: String, - scaling_factor: String, - second_dimension_value: String? - } - end + attr_accessor model_type: :event_output - type tier = { tier_lower_bound: String, unit_amount: String } + attr_accessor name: String - class Tier < Orb::Internal::Type::BaseModel - attr_accessor tier_lower_bound: String + attr_accessor billable_metric_id: String? - attr_accessor unit_amount: String + attr_accessor billed_in_advance: bool? - def initialize: ( - tier_lower_bound: String, - unit_amount: String - ) -> void - - def to_hash: -> { tier_lower_bound: String, unit_amount: String } - end - end + attr_accessor billing_cycle_configuration: Orb::NewBillingCycleConfiguration? - type cumulative_grouped_bulk_config = - { - dimension_values: ::Array[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } + attr_accessor conversion_rate: Float? - class CumulativeGroupedBulkConfig < Orb::Internal::Type::BaseModel - attr_accessor dimension_values: ::Array[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue] + attr_accessor conversion_rate_config: Orb::Models::PriceCreateParams::Body::EventOutput::conversion_rate_config? - attr_accessor group: String + attr_accessor dimensional_price_configuration: Orb::NewDimensionalPriceConfiguration? - def initialize: ( - dimension_values: ::Array[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue], - group: String - ) -> void + attr_accessor external_price_id: String? - def to_hash: -> { - dimension_values: ::Array[Orb::PriceCreateParams::CumulativeGroupedBulkConfig::DimensionValue], - group: String - } + attr_accessor fixed_price_quantity: Float? - type dimension_value = - { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String - } + attr_accessor invoice_grouping_key: String? - class DimensionValue < Orb::Internal::Type::BaseModel - attr_accessor grouping_key: String + attr_accessor invoicing_cycle_configuration: Orb::NewBillingCycleConfiguration? - attr_accessor tier_lower_bound: String + attr_accessor license_type_id: String? - attr_accessor unit_amount: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( - grouping_key: String, - tier_lower_bound: String, - unit_amount: String + cadence: Orb::Models::PriceCreateParams::Body::EventOutput::cadence, + currency: String, + event_output_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::EventOutput::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: :event_output ) -> void def to_hash: -> { - grouping_key: String, - tier_lower_bound: String, - unit_amount: String + cadence: Orb::Models::PriceCreateParams::Body::EventOutput::cadence, + currency: String, + event_output_config: Orb::PriceCreateParams::Body::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::PriceCreateParams::Body::EventOutput::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?]? } - end - 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 + type cadence = + :annual | :semi_annual | :monthly | :quarterly | :one_time | :custom - attr_accessor grouping_key: String + module Cadence + extend Orb::Internal::Type::Enum - attr_accessor unit_amount: String + ANNUAL: :annual + SEMI_ANNUAL: :semi_annual + MONTHLY: :monthly + QUARTERLY: :quarterly + ONE_TIME: :one_time + CUSTOM: :custom - def initialize: ( - cumulative_allocation: String, - group_allocation: String, - grouping_key: String, - unit_amount: String - ) -> void + def self?.values: -> ::Array[Orb::Models::PriceCreateParams::Body::EventOutput::cadence] + end - def to_hash: -> { - 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 - - type percent_config = { percent: Float } + type event_output_config = + { + unit_rating_key: String, + default_unit_rate: String?, + grouping_key: String? + } - class PercentConfig < Orb::Internal::Type::BaseModel - attr_accessor percent: Float + class EventOutputConfig < Orb::Internal::Type::BaseModel + attr_accessor unit_rating_key: String - def initialize: (percent: Float) -> void - - def to_hash: -> { percent: Float } - end + attr_accessor default_unit_rate: String? - type event_output_config = - { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } + attr_accessor grouping_key: String? - class EventOutputConfig < Orb::Internal::Type::BaseModel - attr_accessor unit_rating_key: String + def initialize: ( + unit_rating_key: String, + ?default_unit_rate: String?, + ?grouping_key: String? + ) -> void - 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 to_hash: -> { - unit_rating_key: String, - default_unit_rate: String?, - grouping_key: String? - } + def self?.variants: -> ::Array[Orb::Models::PriceCreateParams::body] end end end diff --git a/sig/orb/models/price_evaluate_params.rbs b/sig/orb/models/price_evaluate_params.rbs index b87c4819a..ddad3d575 100644 --- a/sig/orb/models/price_evaluate_params.rbs +++ b/sig/orb/models/price_evaluate_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type price_evaluate_params = { + price_id: String, timeframe_end: Time, timeframe_start: Time, customer_id: String?, @@ -16,6 +17,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor price_id: String + attr_accessor timeframe_end: Time attr_accessor timeframe_start: Time @@ -33,6 +36,7 @@ module Orb attr_accessor metric_parameter_overrides: ::Hash[Symbol, top]? def initialize: ( + price_id: String, timeframe_end: Time, timeframe_start: Time, ?customer_id: String?, @@ -44,6 +48,7 @@ module Orb ) -> void def to_hash: -> { + price_id: String, timeframe_end: Time, timeframe_start: Time, customer_id: String?, diff --git a/sig/orb/models/price_fetch_params.rbs b/sig/orb/models/price_fetch_params.rbs index 9967d91ac..18cbc2e0a 100644 --- a/sig/orb/models/price_fetch_params.rbs +++ b/sig/orb/models/price_fetch_params.rbs @@ -1,14 +1,20 @@ module Orb module Models - type price_fetch_params = { } & Orb::Internal::Type::request_parameters + type price_fetch_params = + { price_id: String } & Orb::Internal::Type::request_parameters class PriceFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor price_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + price_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { price_id: String, request_options: Orb::RequestOptions } end end end diff --git a/sig/orb/models/price_update_params.rbs b/sig/orb/models/price_update_params.rbs index 6df053fe5..97d026b7e 100644 --- a/sig/orb/models/price_update_params.rbs +++ b/sig/orb/models/price_update_params.rbs @@ -1,21 +1,25 @@ module Orb module Models type price_update_params = - { metadata: ::Hash[Symbol, String?]? } + { price_id: String, metadata: ::Hash[Symbol, String?]? } & Orb::Internal::Type::request_parameters class PriceUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor price_id: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + price_id: String, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + price_id: String, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/prices/external_price_id_fetch_params.rbs b/sig/orb/models/prices/external_price_id_fetch_params.rbs index a8617a38e..81e3cd708 100644 --- a/sig/orb/models/prices/external_price_id_fetch_params.rbs +++ b/sig/orb/models/prices/external_price_id_fetch_params.rbs @@ -2,15 +2,23 @@ module Orb module Models module Prices type external_price_id_fetch_params = - { } & Orb::Internal::Type::request_parameters + { external_price_id: String } & Orb::Internal::Type::request_parameters class ExternalPriceIDFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor external_price_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + external_price_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + external_price_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/prices/external_price_id_update_params.rbs b/sig/orb/models/prices/external_price_id_update_params.rbs index ed60de5ac..d113a0b88 100644 --- a/sig/orb/models/prices/external_price_id_update_params.rbs +++ b/sig/orb/models/prices/external_price_id_update_params.rbs @@ -2,21 +2,25 @@ module Orb module Models module Prices type external_price_id_update_params = - { metadata: ::Hash[Symbol, String?]? } + { external_price_id: String, metadata: ::Hash[Symbol, String?]? } & Orb::Internal::Type::request_parameters class ExternalPriceIDUpdateParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor external_price_id: String + attr_accessor metadata: ::Hash[Symbol, String?]? def initialize: ( + external_price_id: String, ?metadata: ::Hash[Symbol, String?]?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + external_price_id: String, metadata: ::Hash[Symbol, String?]?, request_options: Orb::RequestOptions } diff --git a/sig/orb/models/subscription_cancel_params.rbs b/sig/orb/models/subscription_cancel_params.rbs index 60bfbb900..00f0c1410 100644 --- a/sig/orb/models/subscription_cancel_params.rbs +++ b/sig/orb/models/subscription_cancel_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_cancel_params = { + subscription_id: String, cancel_option: Orb::Models::SubscriptionCancelParams::cancel_option, allow_invoice_credit_or_void: bool?, cancellation_date: Time? @@ -12,6 +13,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor cancel_option: Orb::Models::SubscriptionCancelParams::cancel_option attr_accessor allow_invoice_credit_or_void: bool? @@ -19,6 +22,7 @@ module Orb attr_accessor cancellation_date: Time? def initialize: ( + subscription_id: String, cancel_option: Orb::Models::SubscriptionCancelParams::cancel_option, ?allow_invoice_credit_or_void: bool?, ?cancellation_date: Time?, @@ -26,6 +30,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, cancel_option: Orb::Models::SubscriptionCancelParams::cancel_option, allow_invoice_credit_or_void: bool?, cancellation_date: Time?, diff --git a/sig/orb/models/subscription_change_apply_params.rbs b/sig/orb/models/subscription_change_apply_params.rbs index 2132e9753..28cac6382 100644 --- a/sig/orb/models/subscription_change_apply_params.rbs +++ b/sig/orb/models/subscription_change_apply_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_change_apply_params = { + subscription_change_id: String, description: String?, mark_as_paid: bool?, payment_external_id: String?, @@ -15,6 +16,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_change_id: String + attr_accessor description: String? attr_accessor mark_as_paid: bool? @@ -28,6 +31,7 @@ module Orb attr_accessor previously_collected_amount: String? def initialize: ( + subscription_change_id: String, ?description: String?, ?mark_as_paid: bool?, ?payment_external_id: String?, @@ -38,6 +42,7 @@ module Orb ) -> void def to_hash: -> { + subscription_change_id: String, description: String?, mark_as_paid: bool?, payment_external_id: String?, diff --git a/sig/orb/models/subscription_change_cancel_params.rbs b/sig/orb/models/subscription_change_cancel_params.rbs index 5e79a8b96..6a50c6524 100644 --- a/sig/orb/models/subscription_change_cancel_params.rbs +++ b/sig/orb/models/subscription_change_cancel_params.rbs @@ -1,15 +1,24 @@ module Orb module Models type subscription_change_cancel_params = - { } & Orb::Internal::Type::request_parameters + { subscription_change_id: String } + & Orb::Internal::Type::request_parameters class SubscriptionChangeCancelParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor subscription_change_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + subscription_change_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + subscription_change_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_change_retrieve_params.rbs b/sig/orb/models/subscription_change_retrieve_params.rbs index 14d4d7d8c..d3aeb5322 100644 --- a/sig/orb/models/subscription_change_retrieve_params.rbs +++ b/sig/orb/models/subscription_change_retrieve_params.rbs @@ -1,15 +1,24 @@ module Orb module Models type subscription_change_retrieve_params = - { } & Orb::Internal::Type::request_parameters + { subscription_change_id: String } + & Orb::Internal::Type::request_parameters class SubscriptionChangeRetrieveParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor subscription_change_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + subscription_change_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + subscription_change_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_fetch_costs_params.rbs b/sig/orb/models/subscription_fetch_costs_params.rbs index 71af034e8..d3d94580e 100644 --- a/sig/orb/models/subscription_fetch_costs_params.rbs +++ b/sig/orb/models/subscription_fetch_costs_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_fetch_costs_params = { + subscription_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, @@ -13,6 +14,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor currency: String? attr_accessor timeframe_end: Time? @@ -22,6 +25,7 @@ module Orb attr_accessor view_mode: Orb::Models::SubscriptionFetchCostsParams::view_mode? def initialize: ( + subscription_id: String, ?currency: String?, ?timeframe_end: Time?, ?timeframe_start: Time?, @@ -30,6 +34,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, currency: String?, timeframe_end: Time?, timeframe_start: Time?, diff --git a/sig/orb/models/subscription_fetch_params.rbs b/sig/orb/models/subscription_fetch_params.rbs index 6d0739845..21961804d 100644 --- a/sig/orb/models/subscription_fetch_params.rbs +++ b/sig/orb/models/subscription_fetch_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type subscription_fetch_params = - { } & Orb::Internal::Type::request_parameters + { subscription_id: String } & Orb::Internal::Type::request_parameters class SubscriptionFetchParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor subscription_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + subscription_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + subscription_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_fetch_schedule_params.rbs b/sig/orb/models/subscription_fetch_schedule_params.rbs index a33a62c84..94b01ffe8 100644 --- a/sig/orb/models/subscription_fetch_schedule_params.rbs +++ b/sig/orb/models/subscription_fetch_schedule_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_fetch_schedule_params = { + subscription_id: String, cursor: String?, limit: Integer, start_date_gt: Time?, @@ -15,6 +16,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor cursor: String? attr_reader limit: Integer? @@ -30,6 +33,7 @@ module Orb attr_accessor start_date_lte: Time? def initialize: ( + subscription_id: String, ?cursor: String?, ?limit: Integer, ?start_date_gt: Time?, @@ -40,6 +44,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, cursor: String?, limit: Integer, start_date_gt: Time?, diff --git a/sig/orb/models/subscription_fetch_usage_params.rbs b/sig/orb/models/subscription_fetch_usage_params.rbs index 60acf88a2..73a1a3a6c 100644 --- a/sig/orb/models/subscription_fetch_usage_params.rbs +++ b/sig/orb/models/subscription_fetch_usage_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_fetch_usage_params = { + subscription_id: String, billable_metric_id: String?, first_dimension_key: String?, first_dimension_value: String?, @@ -19,6 +20,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor billable_metric_id: String? attr_accessor first_dimension_key: String? @@ -40,6 +43,7 @@ module Orb attr_accessor view_mode: Orb::Models::SubscriptionFetchUsageParams::view_mode? def initialize: ( + subscription_id: String, ?billable_metric_id: String?, ?first_dimension_key: String?, ?first_dimension_value: String?, @@ -54,6 +58,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, billable_metric_id: String?, first_dimension_key: String?, first_dimension_value: String?, diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 2cbfabc8b..008136199 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_price_intervals_params = { + subscription_id: String, add: ::Array[Orb::SubscriptionPriceIntervalsParams::Add], add_adjustments: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment], allow_invoice_credit_or_void: bool?, @@ -15,6 +16,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_reader add: ::Array[Orb::SubscriptionPriceIntervalsParams::Add]? def add=: ( @@ -44,6 +47,7 @@ module Orb ) -> ::Array[Orb::SubscriptionPriceIntervalsParams::EditAdjustment] def initialize: ( + subscription_id: String, ?add: ::Array[Orb::SubscriptionPriceIntervalsParams::Add], ?add_adjustments: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment], ?allow_invoice_credit_or_void: bool?, @@ -54,6 +58,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, add: ::Array[Orb::SubscriptionPriceIntervalsParams::Add], add_adjustments: ::Array[Orb::SubscriptionPriceIntervalsParams::AddAdjustment], allow_invoice_credit_or_void: bool?, diff --git a/sig/orb/models/subscription_redeem_coupon_params.rbs b/sig/orb/models/subscription_redeem_coupon_params.rbs index a357a906c..2426dc6a8 100644 --- a/sig/orb/models/subscription_redeem_coupon_params.rbs +++ b/sig/orb/models/subscription_redeem_coupon_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_redeem_coupon_params = { + subscription_id: String, change_option: Orb::Models::SubscriptionRedeemCouponParams::change_option, allow_invoice_credit_or_void: bool?, change_date: Time?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor change_option: Orb::Models::SubscriptionRedeemCouponParams::change_option attr_accessor allow_invoice_credit_or_void: bool? @@ -25,6 +28,7 @@ module Orb attr_accessor coupon_redemption_code: String? def initialize: ( + subscription_id: String, change_option: Orb::Models::SubscriptionRedeemCouponParams::change_option, ?allow_invoice_credit_or_void: bool?, ?change_date: Time?, @@ -34,6 +38,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, change_option: Orb::Models::SubscriptionRedeemCouponParams::change_option, allow_invoice_credit_or_void: bool?, change_date: Time?, diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 379ed6a25..875f59dbe 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_schedule_plan_change_params = { + subscription_id: String, change_option: Orb::Models::SubscriptionSchedulePlanChangeParams::change_option, add_adjustments: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment]?, add_prices: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice]?, @@ -35,6 +36,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor change_option: Orb::Models::SubscriptionSchedulePlanChangeParams::change_option attr_accessor add_adjustments: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment]? @@ -88,6 +91,7 @@ module Orb attr_accessor usage_customer_ids: ::Array[String]? def initialize: ( + subscription_id: String, change_option: Orb::Models::SubscriptionSchedulePlanChangeParams::change_option, ?add_adjustments: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment]?, ?add_prices: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice]?, @@ -118,6 +122,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, change_option: Orb::Models::SubscriptionSchedulePlanChangeParams::change_option, add_adjustments: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddAdjustment]?, add_prices: ::Array[Orb::SubscriptionSchedulePlanChangeParams::AddPrice]?, diff --git a/sig/orb/models/subscription_trigger_phase_params.rbs b/sig/orb/models/subscription_trigger_phase_params.rbs index fbd2313d8..7da9f18a4 100644 --- a/sig/orb/models/subscription_trigger_phase_params.rbs +++ b/sig/orb/models/subscription_trigger_phase_params.rbs @@ -1,24 +1,32 @@ module Orb module Models type subscription_trigger_phase_params = - { allow_invoice_credit_or_void: bool?, effective_date: Date? } + { + subscription_id: String, + allow_invoice_credit_or_void: bool?, + effective_date: Date? + } & Orb::Internal::Type::request_parameters class SubscriptionTriggerPhaseParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor allow_invoice_credit_or_void: bool? attr_accessor effective_date: Date? def initialize: ( + subscription_id: String, ?allow_invoice_credit_or_void: bool?, ?effective_date: Date?, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + subscription_id: String, allow_invoice_credit_or_void: bool?, effective_date: Date?, request_options: Orb::RequestOptions diff --git a/sig/orb/models/subscription_unschedule_cancellation_params.rbs b/sig/orb/models/subscription_unschedule_cancellation_params.rbs index 073c37702..cbd084238 100644 --- a/sig/orb/models/subscription_unschedule_cancellation_params.rbs +++ b/sig/orb/models/subscription_unschedule_cancellation_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type subscription_unschedule_cancellation_params = - { } & Orb::Internal::Type::request_parameters + { subscription_id: String } & Orb::Internal::Type::request_parameters class SubscriptionUnscheduleCancellationParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor subscription_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + subscription_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + subscription_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs index 5b8531046..3b50b55f7 100644 --- a/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +++ b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs @@ -1,20 +1,28 @@ module Orb module Models type subscription_unschedule_fixed_fee_quantity_updates_params = - { price_id: String } & Orb::Internal::Type::request_parameters + { subscription_id: String, price_id: String } + & Orb::Internal::Type::request_parameters class SubscriptionUnscheduleFixedFeeQuantityUpdatesParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor price_id: String def initialize: ( + subscription_id: String, price_id: String, ?request_options: Orb::request_opts ) -> void - def to_hash: -> { price_id: String, request_options: Orb::RequestOptions } + def to_hash: -> { + subscription_id: String, + price_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs b/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs index b98ca190f..3430d6d5d 100644 --- a/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +++ b/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs @@ -1,15 +1,23 @@ module Orb module Models type subscription_unschedule_pending_plan_changes_params = - { } & Orb::Internal::Type::request_parameters + { subscription_id: String } & Orb::Internal::Type::request_parameters class SubscriptionUnschedulePendingPlanChangesParams < Orb::Internal::Type::BaseModel extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters - def initialize: (?request_options: Orb::request_opts) -> void + attr_accessor subscription_id: String - def to_hash: -> { request_options: Orb::RequestOptions } + def initialize: ( + subscription_id: String, + ?request_options: Orb::request_opts + ) -> void + + def to_hash: -> { + subscription_id: String, + request_options: Orb::RequestOptions + } end end end diff --git a/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs b/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs index dc7265bea..16d490ee5 100644 --- a/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +++ b/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_update_fixed_fee_quantity_params = { + subscription_id: String, price_id: String, quantity: Float, allow_invoice_credit_or_void: bool?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor price_id: String attr_accessor quantity: Float @@ -29,6 +32,7 @@ module Orb attr_accessor effective_date: Date? def initialize: ( + subscription_id: String, price_id: String, quantity: Float, ?allow_invoice_credit_or_void: bool?, @@ -38,6 +42,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, price_id: String, quantity: Float, allow_invoice_credit_or_void: bool?, diff --git a/sig/orb/models/subscription_update_params.rbs b/sig/orb/models/subscription_update_params.rbs index 80e53f166..19edefea3 100644 --- a/sig/orb/models/subscription_update_params.rbs +++ b/sig/orb/models/subscription_update_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_update_params = { + subscription_id: String, auto_collection: bool?, default_invoice_memo: String?, invoicing_threshold: String?, @@ -14,6 +15,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor auto_collection: bool? attr_accessor default_invoice_memo: String? @@ -25,6 +28,7 @@ module Orb attr_accessor net_terms: Integer? def initialize: ( + subscription_id: String, ?auto_collection: bool?, ?default_invoice_memo: String?, ?invoicing_threshold: String?, @@ -34,6 +38,7 @@ module Orb ) -> void def to_hash: -> { + subscription_id: String, auto_collection: bool?, default_invoice_memo: String?, invoicing_threshold: String?, diff --git a/sig/orb/models/subscription_update_trial_params.rbs b/sig/orb/models/subscription_update_trial_params.rbs index f0b931ed1..ea650ef00 100644 --- a/sig/orb/models/subscription_update_trial_params.rbs +++ b/sig/orb/models/subscription_update_trial_params.rbs @@ -2,6 +2,7 @@ module Orb module Models type subscription_update_trial_params = { + subscription_id: String, trial_end_date: Orb::Models::SubscriptionUpdateTrialParams::trial_end_date, shift: bool } @@ -11,6 +12,8 @@ module Orb extend Orb::Internal::Type::RequestParameters::Converter include Orb::Internal::Type::RequestParameters + attr_accessor subscription_id: String + attr_accessor trial_end_date: Orb::Models::SubscriptionUpdateTrialParams::trial_end_date attr_reader shift: bool? @@ -18,12 +21,14 @@ module Orb def shift=: (bool) -> bool def initialize: ( + subscription_id: String, trial_end_date: Orb::Models::SubscriptionUpdateTrialParams::trial_end_date, ?shift: bool, ?request_options: Orb::request_opts ) -> void def to_hash: -> { + subscription_id: String, trial_end_date: Orb::Models::SubscriptionUpdateTrialParams::trial_end_date, shift: bool, request_options: Orb::RequestOptions diff --git a/sig/orb/resources/alerts.rbs b/sig/orb/resources/alerts.rbs index 12de962d1..7f1000be5 100644 --- a/sig/orb/resources/alerts.rbs +++ b/sig/orb/resources/alerts.rbs @@ -45,7 +45,9 @@ module Orb String subscription_id, thresholds: ::Array[Orb::Threshold], type: Orb::Models::AlertCreateForSubscriptionParams::type_, + ?grouping_keys: ::Array[String]?, ?metric_id: String?, + ?pricing_unit_id: String?, ?request_options: Orb::request_opts ) -> Orb::Alert diff --git a/sig/orb/resources/customers/credits/ledger.rbs b/sig/orb/resources/customers/credits/ledger.rbs index 247a99398..af3e7c6ed 100644 --- a/sig/orb/resources/customers/credits/ledger.rbs +++ b/sig/orb/resources/customers/credits/ledger.rbs @@ -20,37 +20,13 @@ module Orb def create_entry: ( String customer_id, - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type, - target_expiry_date: Date, - block_id: String, - ?currency: String?, - ?description: String?, - ?effective_date: Time?, - ?expiry_date: Time?, - ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryParams::Filter]?, - ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?, - ?metadata: ::Hash[Symbol, String?]?, - ?per_unit_cost_basis: String?, - ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryParams::void_reason?, + body: Orb::Models::Customers::Credits::LedgerCreateEntryParams::body, ?request_options: Orb::request_opts ) -> Orb::Models::Customers::Credits::ledger_create_entry_response def create_entry_by_external_id: ( String external_customer_id, - amount: Float, - entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type, - target_expiry_date: Date, - block_id: String, - ?currency: String?, - ?description: String?, - ?effective_date: Time?, - ?expiry_date: Time?, - ?filters: ::Array[Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter]?, - ?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?, - ?metadata: ::Hash[Symbol, String?]?, - ?per_unit_cost_basis: String?, - ?void_reason: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::void_reason?, + body: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::body, ?request_options: Orb::request_opts ) -> Orb::Models::Customers::Credits::ledger_create_entry_by_external_id_response diff --git a/sig/orb/resources/prices.rbs b/sig/orb/resources/prices.rbs index 69f73f478..b6798e095 100644 --- a/sig/orb/resources/prices.rbs +++ b/sig/orb/resources/prices.rbs @@ -4,54 +4,7 @@ module Orb attr_reader external_price_id: Orb::Resources::Prices::ExternalPriceID def create: ( - cadence: Orb::Models::PriceCreateParams::cadence, - currency: String, - item_id: String, - model_type: Orb::Models::PriceCreateParams::model_type, - name: String, - unit_config: Orb::UnitConfig, - tiered_config: Orb::TieredConfig, - bulk_config: Orb::BulkConfig, - bulk_with_filters_config: Orb::PriceCreateParams::BulkWithFiltersConfig, - package_config: Orb::PackageConfig, - matrix_config: Orb::MatrixConfig, - threshold_total_amount_config: Orb::PriceCreateParams::ThresholdTotalAmountConfig, - tiered_package_config: Orb::PriceCreateParams::TieredPackageConfig, - tiered_with_minimum_config: Orb::PriceCreateParams::TieredWithMinimumConfig, - grouped_tiered_config: Orb::PriceCreateParams::GroupedTieredConfig, - tiered_package_with_minimum_config: Orb::PriceCreateParams::TieredPackageWithMinimumConfig, - package_with_allocation_config: Orb::PriceCreateParams::PackageWithAllocationConfig, - unit_with_percent_config: Orb::PriceCreateParams::UnitWithPercentConfig, - matrix_with_allocation_config: Orb::MatrixWithAllocationConfig, - tiered_with_proration_config: Orb::PriceCreateParams::TieredWithProrationConfig, - unit_with_proration_config: Orb::PriceCreateParams::UnitWithProrationConfig, - grouped_allocation_config: Orb::PriceCreateParams::GroupedAllocationConfig, - bulk_with_proration_config: Orb::PriceCreateParams::BulkWithProrationConfig, - grouped_with_prorated_minimum_config: Orb::PriceCreateParams::GroupedWithProratedMinimumConfig, - grouped_with_metered_minimum_config: Orb::PriceCreateParams::GroupedWithMeteredMinimumConfig, - grouped_with_min_max_thresholds_config: Orb::PriceCreateParams::GroupedWithMinMaxThresholdsConfig, - matrix_with_display_name_config: Orb::PriceCreateParams::MatrixWithDisplayNameConfig, - grouped_tiered_package_config: Orb::PriceCreateParams::GroupedTieredPackageConfig, - max_group_tiered_package_config: Orb::PriceCreateParams::MaxGroupTieredPackageConfig, - scalable_matrix_with_unit_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithUnitPricingConfig, - scalable_matrix_with_tiered_pricing_config: Orb::PriceCreateParams::ScalableMatrixWithTieredPricingConfig, - cumulative_grouped_bulk_config: Orb::PriceCreateParams::CumulativeGroupedBulkConfig, - cumulative_grouped_allocation_config: Orb::PriceCreateParams::CumulativeGroupedAllocationConfig, - minimum_composite_config: Orb::PriceCreateParams::MinimumCompositeConfig, - percent_config: Orb::PriceCreateParams::PercentConfig, - event_output_config: Orb::PriceCreateParams::EventOutputConfig, - ?billable_metric_id: String?, - ?billed_in_advance: bool?, - ?billing_cycle_configuration: Orb::NewBillingCycleConfiguration?, - ?conversion_rate: Float?, - ?conversion_rate_config: Orb::Models::PriceCreateParams::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?]?, + body: Orb::Models::PriceCreateParams::body, ?request_options: Orb::request_opts ) -> Orb::Models::price diff --git a/test/orb/resources/alerts_test.rb b/test/orb/resources/alerts_test.rb index 1b2aa5ee1..f473cb4b1 100644 --- a/test/orb/resources/alerts_test.rb +++ b/test/orb/resources/alerts_test.rb @@ -23,6 +23,7 @@ def test_retrieve thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -48,6 +49,7 @@ def test_update_required_params thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -82,6 +84,7 @@ def test_list thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -108,6 +111,7 @@ def test_create_for_customer_required_params thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -138,6 +142,7 @@ def test_create_for_external_customer_required_params thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -164,6 +169,7 @@ def test_create_for_subscription_required_params thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -189,6 +195,7 @@ def test_disable thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end @@ -214,6 +221,7 @@ def test_enable thresholds: ^(Orb::Internal::Type::ArrayOf[Orb::Threshold]) | nil, 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 } end diff --git a/test/orb/resources/customers/credits/ledger_test.rb b/test/orb/resources/customers/credits/ledger_test.rb index ef9815dd8..039b3b991 100644 --- a/test/orb/resources/customers/credits/ledger_test.rb +++ b/test/orb/resources/customers/credits/ledger_test.rb @@ -152,12 +152,7 @@ def test_list def test_create_entry_required_params response = - @orb.customers.credits.ledger.create_entry( - "customer_id", - amount: 0, - block_id: "block_id", - entry_type: :void - ) + @orb.customers.credits.ledger.create_entry("customer_id", body: {amount: 0, entry_type: :increment}) assert_pattern do response => Orb::Models::Customers::Credits::LedgerCreateEntryResponse @@ -300,9 +295,7 @@ def test_create_entry_by_external_id_required_params response = @orb.customers.credits.ledger.create_entry_by_external_id( "external_customer_id", - amount: 0, - block_id: "block_id", - entry_type: :void + body: {amount: 0, entry_type: :increment} ) assert_pattern do diff --git a/test/orb/resources/prices_test.rb b/test/orb/resources/prices_test.rb index 7151448ee..298dcd4de 100644 --- a/test/orb/resources/prices_test.rb +++ b/test/orb/resources/prices_test.rb @@ -6,12 +6,14 @@ class Orb::Test::Resources::PricesTest < Orb::Test::ResourceTest def test_create_required_params response = @orb.prices.create( - cadence: :annual, - currency: "currency", - item_id: "item_id", - model_type: :unit, - name: "Annual fee", - unit_config: {unit_amount: "unit_amount"} + body: { + cadence: :annual, + currency: "currency", + item_id: "item_id", + model_type: :unit, + name: "Annual fee", + unit_config: {unit_amount: "unit_amount"} + } ) assert_pattern do